提交时间:2026-04-10 14:49:22

运行 ID: 86948

#include <bits/stdc++.h> using namespace std ; int n , x ; int cnt = 0 , cnt2 = 0 ; int main() { cin >> n ; while(n--) { cin >> x ; if(x % 2) cnt++ ; else cnt2++; } cout << ' ' << cnt << ' ' << cnt2 << endl ; return 0 ; }