题解 | 多组_二维数组_T组形式
#include <stdio.h> int main(){ int a; scanf("%d",&a); for(int i=1;i<=a;i++){ int b, c; scanf("%d %d",&b,&c); long long int sum=0; for(int j=1;j<=b;j++){ for(int k=1;k<=c;k++){ int temp; scanf("%d",&temp); sum+=temp; } } printf("%lld\n",sum); } }