update
This commit is contained in:
parent
ef9d5b910a
commit
0caa758c70
33
20240829/B4015/B4015.cpp
Normal file
33
20240829/B4015/B4015.cpp
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user