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)); String n = reader.readLine(); for(int i=0;i<n.length();i++){ int temp = n.charAt(i)-'0'; if(temp % 2 == 0){ even += 1;} else{ odd +=1;} } System.out.print("偶数:" + even + " 奇数:" + odd); } }