3 solutions

  • 1
    @ 2026-2-23 11:32:04
    #include<bits/stdc++.h>
    using namespace std;
    int main() {
        int n;
        cin>>n;
        int js=0;
        int os=0;
        for(int i=0;i<n;i++){
            int t;
            cin>>t;
    
            if(t%2==0){
                js++;
            }else{
                os++;
            }
        }
        cout<<os<<" "<<js;
        return 0;
    }
    
    

    Information

    ID
    9
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    4
    Tags
    # Submissions
    31
    Accepted
    18
    Uploaded By