Skip to content

Instantly share code, notes, and snippets.

@Trimad
Created July 8, 2019 01:16
Show Gist options
  • Save Trimad/1f66f2a7a737e9459d00369560cfabc1 to your computer and use it in GitHub Desktop.
Save Trimad/1f66f2a7a737e9459d00369560cfabc1 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class Kattis {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
long X = sc.nextLong();
long Y = sc.nextLong();
if (X > Y) {
System.out.println(Math.abs(X - Y));
} else {
System.out.println(Math.abs(X - Y));
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment