您的位置:首页 > 其它

L1-022. 奇偶分家

2017-03-11 15:48 246 查看


//AC

#include <iostream>
#include <cstdlib>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <set>
typedef long long ll;
using namespace std;
int main(){
int n,x;
int a,b;
scanf("%d",&n);
a=b=0;
for (int i = 1; i<=n; i++) {
scanf("%d",&x);
if((x%2)==0){a++;}
else{b++;}
}
printf("%d %d\n",b,a);
return 0;
}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: