Plabon_dutta

Uva 10550

Feb 28th, 2021 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include<math.h>
  4.  
  5. int main() {
  6.     int a, b, c, d;
  7.     while(1) {
  8.         scanf("%d %d %d %d", &a, &b, &c, &d);
  9.         if(a==0 && b==0 && c==0 && d==0) break;
  10.         int x=0;
  11.         x=((a-b+40)%40) + ((c-b+40)%40) + ((c-d+40)%40);
  12.         printf("%d\n", (x*9)+1080);
  13.     }
  14.     return 0;
  15. }
  16.  
Add Comment
Please, Sign In to add comment