Вроде все соответствует условию, но валидатор ругется. Подскажите, что не так?
package com.javarush.task.task06.task0606;
import java.io.*;
/*
Чётные и нечётные циферки
*/
public class Solution {
public static int even;
public static int odd;
public static void main(String[] args) throws IOException {
InputStream in = System.in;
InputStreamReader In = new InputStreamReader(in);
BufferedReader bu = new BufferedReader(In);
int number = Integer.parseInt(bu.readLine());
int tier1 = number % 10;
int tier2 = ((number % 100) - tier1) / 10;
int tier3 = ((number % 1000) - tier2 - tier1) / 100;
int tier4 = ((number % 10000) - tier3 - tier2 - tier1) / 1000;
if (tier4 % 2 == 0) {
Solution.even++;
} else Solution.odd++;
if (tier3 % 2 == 0) {
Solution.even++;
} else Solution.odd++;
if (tier2 % 2 == 0) {
Solution.even++;
} else Solution.odd++;
if (tier1 % 2 == 0) {
Solution.even++;
} else Solution.odd++;
System.out.println("Even: "+Solution.even+" Odd: "+Solution.odd);
}
}