3 条题解
-
3
202507cj04王晟睿 (王晟睿) LV 7 @ 2025-04-19 20:53:22
#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;
} -
12025-07-20 08:11:56@
#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;
} -
02025-07-20 08:11:56@
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>
return 0;
}
- 1
信息
- ID
- 2848
- 难度
- 7
- 分类
- (无)
- 标签
- 递交数
- 256
- 已通过
- 48
- 通过率
- 19%
- 上传者