не проходит единственный пункт:
"Введённый текст должен соответствовать заданию".
Не могу понять где ошибка, всё считает корректно
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 {
//напишите тут ваш код
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
int x = Integer.parseInt(s);
int dlina = s.length();
if (x < 0) {
x = -x;
}
if (x == 0)
Solution.even++;
else {
for (int i = 0; i < dlina; i++) {
if (x % 2 == 0) {
Solution.even++;
}
else
Solution.odd++;
x /= 10;
}
}
System.out.println("Even: " + Solution.even + " Odd: " + Solution.odd);
}
}