1 solutions

  • 1
    @ 2025-7-8 10:34:31
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n,m=0,k=0;
    	cin>>n;
    	for(int i=1;i<=n;i++){
    		int x;
    		cin>>x;
    		if(x%2==0){
    			m++;
    		}
    		else k++;
    	}
    	cout<<k<<" "<<m;
    	return 0;
    }
    
    
    
    • 1

    Information

    ID
    2838
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    11
    Accepted
    9
    Uploaded By