I can't see where the problem is with this, it compiles and seems to output correctly, still fails verify with "The displayed text must match the task conditions." Can someone please help me with this to get it to verify.
package com.codegym.task.task06.task0606;
import java.io.*;
/*
Even and odd digits
*/
public class Solution {
public static int even;
public static int odd;
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int a = Integer.parseInt(br.readLine());
if (a < 0) a *= -1;
for (int i = 1; i < a; i *= 10) {
int n = a / i;
if (n % 2 == 0)
even++;
else
odd++;
}
System.out.println("Even: " + even + " Odd: " + odd);
}
}