Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
62566 | 极力泰美 | 比较奇偶数个数 | C++ | Compile Error | 0 | 0 MS | 0 KB | 371 | 2022-11-05 18:50:16 |
#include<iostream> using namesapce std; int get(int b){ if(b%2==0) return 1; return -1; } int main(){ while 1{ int ans=0; int a; cin>>a; int line[a]; for(int i=0;i<a;i++){ cin>>line[i]; } for(int i=0;i<a;i++){ ans+=get(line[i]); } cout<<ans; } }