as follows
package zh.codegym.task.task06.task0606;
import java.io.*;
/*
偶数和奇数
*/
public class Solution {
public static int even = 0;
public static int odd = 0;
public static void main(String[] args) throws IOException {
//在此编写你的代码
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int p = Integer.parseInt(reader.readLine());
int s = 0, b = 0;
while (p != 0) {
int a = p % 10;
p /= 10;
if (a % 2 == 0) {
s ++;
} else b ++;
}
even = s;
odd = b;
System.out.println("偶数:" + even + " 奇数:" + odd);
}
}