RE求救(壶关)
查看原帖
RE求救(壶关)
949965
yangzekai2024楼主2024/12/14 19:57

0分求调

#include<bits/stdc++.h>
using namespace std;
long long a[10001],b,j=0,o=0;
int main()
{
	cin>>b;
	for(int i=0;i<b;i++)
	{
		cin>>a[i];
	}
	for (int i = 1; i <= b; i++) 
	{
    if (a[i] % 2 == 1)  
        j++;
    else  
        o++;
    }
	cout<<o<<" "<<j<<endl;
    return 0;
}
2024/12/14 19:57
加载中...