1 条题解

  • 2
    @ 2025-04-19 20:53:22

    #include <iostream>
    using namespace std;
    int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, num, odd = 0, even = 0;
    cin >> n;
    for (int i = 0; i < n; ++i) {
    cin >> num;
    if (num % 2 == 0) {
    even++;
    } else {
    odd++;
    }
    }
    cout << odd << " " << even << endl;
    return 0;
    }

  • 1

信息

ID
2848
难度
7
分类
(无)
标签
递交数
175
已通过
32
通过率
18%
上传者