|
|
back to boardActual Solution is Wrong Answer I think the actual solution may like this: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int harry, larry, max;
while(sc.hasNext()){ harry = sc.nextInt(); larry = sc.nextInt();
max = harry + larry;
if(((max % 10) != 0)){
if(((max % 10) <= ((max / 10)))){ max = (10 * ((max / 10))); } else{ max = (10 * ((max / 10) + 1)); } } System.out.println((max - harry) +" "+ (max - larry)); } sc.close(); } } |
|
|