题解 | 单组_二维数组
单组_二维数组
https://www.nowcoder.com/practice/4df606b6c3764d9c969f8759c8a4807b
#include <stdio.h>
int main() {
long a, b;
scanf("%ld %ld",&a,&b);
long arr[a][b];
long sum=0;
for(int i=0;i<a;i++)
{
for(int j=0;j<b;j++)
{
scanf("%ld",&arr[i][j]);
sum+=arr[i][j];
}
}
printf("%ld",sum);
return 0;
}