Что не так то. В той же idea работает именно так указано в условии
package com.javarush.task.pro.task03.task0305;
import java.util.Scanner;
/*
Три числа
*/
public class Solution {
public static void main(String[] args) {
//напишите тут ваш код
Scanner scanner = new Scanner(System.in);
int firstValue = scanner.nextInt();
int secondValue = scanner.nextInt();
int thirdValue = scanner.nextInt();
if (firstValue == secondValue && firstValue == thirdValue && secondValue == thirdValue) {
System.out.println(firstValue + "\n" + secondValue + "\n" + thirdValue);
}
else if (firstValue == secondValue) {
System.out.println(firstValue + "\n" + secondValue);
}
else if (firstValue == thirdValue) {
System.out.println(firstValue + "\n" + thirdValue);
}
else if (secondValue == thirdValue) {
System.out.println(secondValue +"\n" + thirdValue);
}
}
}