2 solutions

  • 2
    @ 2026-8-12 11:50:19

    于中华人民共和国建国第77年农历6月三十日,受到了季先生的皮肉之苦而成功做出此题,由此灵感大发写此标题。赞吾者的相貌会与彭于晏有几分相似。

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int s,b;
        cin>>s;
        int q=0;
        int w=0;
        for(int i=1;i<=s;i++){
        	cin>>b;
        	if(b%2==0){
        	    q=q+1;
    		}
    		else
    		{
    			w=w+1;
    		}
    	}
    	cout<<w<<" "<<q;
        return 0;
    }
    
    • 0
      @ 2026-8-13 16:09:09
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int n;
      	cin>>n;
      	int j=0;
      	int o=0;
      	for(int i=1;i<=n;i++)
      	{
      		int a;
      		cin>>a;
      		if(a%2==0)
      		{
      			o++;
      		}
      		else
      		{
      			j++;
      		}
      	}
      	cout<<j<<" "<<o;
      	return 0; 
      }
      
      • 1

      Information

      ID
      2210
      Time
      1000ms
      Memory
      256MiB
      Difficulty
      1
      Tags
      # Submissions
      132
      Accepted
      47
      Uploaded By