import java.util.Scanner;
public class Homework_1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in=new Scanner(System.in);
int n=in.nextInt();
int a=0,b=0;
if(n<=100000) {
while(n>-1) {
if(n%2==0) {
a++;
}
else {
b++;
}
n=in.nextInt();
}
System.out.println(b+" "+a);
}
}
}
本次代码比较简单,不再写注释,如果看不懂,请在评论区打出你的问题