This will output the correct answer for the test input in the conditions and anything else I have thrown into it. I take into account possible negative numbers entered by the user, and it outputs the correct answer, but I keep getting told the "displayed text must match the task conditions." The commented out lines on the bottom also apparently will not match the task conditions. The displayed text looks like the task conditions, I even copied and pasted it into the solution to make sure I'm not missing spaces or anything. What is it that I am not seeing?
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 IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String strN = reader.readLine();
int n = Integer.parseInt(strN);
if (n < 0) n *= -1;
for (int i = 1; i < n; i *= 10) {
int m = n / i;
if (m % 2 == 0)
even++;
else
odd++;
}
//System.out.print("Even: " + even + " " + "Odd: " + odd);
//System.out.println("Even: " + even + " " + "Odd: " + odd);
//System.out.print("Even: " + even + " Odd: " + odd);
System.out.println("Even:" + " " + even + "Odd:" + " " + odd);
//System.out.println("Even: " + even + " Odd: " + odd);
}
}