This commit is contained in:
Zengtudor 2024-08-30 17:13:52 +08:00
parent ef9d5b910a
commit 0caa758c70
2 changed files with 37 additions and 1 deletions

33
20240829/B4015/B4015.cpp Normal file
View File

@ -0,0 +1,33 @@
#include <cctype>
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
ll readint(){
int x=0,w=1;
char ch=0;
while(!isdigit(ch)){
if(ch=='-')w=-1;
ch=getchar();
}
while(isdigit(ch)){
x=x*10+(ch-'0');
ch=getchar();
}
return x*w;
}
int main(){
const ll n=readint(),m=readint();
ll ans{};
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
ll num{readint()};
if(i%3==2&&j%3==2){
ans+=num;
}
}
}
printf("%lld",ans);
}

View File

@ -25,4 +25,7 @@ target("lq14sd")
add_files("20240823/十四届蓝桥比赛/数独填数.cpp") add_files("20240823/十四届蓝桥比赛/数独填数.cpp")
target("P2615") target("P2615")
add_files("20240828/P2615/P2615.cpp") add_files("20240828/P2615/P2615.cpp")
target("B4015")
add_files("20240829/B4015/B4015.cpp")