fork(2) download
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include <stdlib.h>
  4. int main (void)
  5. {
  6. long long int x, y, z;
  7. while (scanf("%lld %lld", &x, &y) != EOF)
  8. {
  9. printf ("%lld\n", abs (x - y) );
  10. if (scanf ("%lld %lld", &x, &y) == EOF)
  11. break;
  12. printf ("%lld\n", abs (x - y) );
  13. }
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 2296KB
stdin
5 10
20 30
1871293781758123 72784
stdout
-4629480755129483259
-4629480755129483254
-4629480753135137883