Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
351901 | 鲁嘉俊 | 【C4-8】奇偶统计? | C++ | 通过 | 100 | 4 MS | 248 KB | 276 | 2025-09-21 16:32:57 |
#include<bits/stdc++.h> using namespace std; int n,m,a[105][105],x=0,y=0; int main( ){ cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>a[i][j]; if(a[i][j]%2==0) x++; else if(a[i][j]%2!=0) y++; } }cout<<y<<" "<<x; return 0; }