摘要:
代码: #include<iostream>using namespace std ;int main (){int row , line ; //记录矩阵的行数,列数while (scanf("%d%d",&row,&line) && (row+line)!=0){int s1=0,s2=0; //分别记录黑白格子数目for(int i=0;i<row;i++){for (int j=0;j<line;j++){int num;cin >> num;if((i+j)%2==0)s1+=num;elses2 阅读全文