fork(1) download
  1. import java.util.*;
  2. import java.math.*;
  3.  
  4. public class Main
  5. {
  6. public static void main(String args[])
  7. {
  8. Scanner cin = new Scanner(System.in);
  9.  
  10. while(cin.hasNext())
  11. {
  12. long a = cin.nextLong();
  13. long b = cin.nextLong();
  14.  
  15. System.out.println(Math.abs(a - b));
  16. }
  17. }
  18. }
Success #stdin #stdout 0.1s 380672KB
stdin
10 12
10 14
100 200
stdout
2
4
100