3 条题解

  • 3

    #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

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    int n,a;
    cin>>n;
    int t=0;
    int sum=0;
    for(int i=1;i<=n;i++)
    {
    cin>>a;
    if(a%2==0)
    sum++;
    if(a%2!=0)
    t++;
    }
    cout<<t<<" "<<sum;
    return 0;
    }

  • 0

    #include<bits/stdc++.h>

    using namespace std;
    int main()
    {
    int a,b;
    cin>>
    return 0;
    }

  • 1

信息

ID
2848
难度
7
分类
(无)
标签
递交数
256
已通过
48
通过率
19%
上传者