Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include<math.h>
- int main() {
- int a, b, c, d;
- while(1) {
- scanf("%d %d %d %d", &a, &b, &c, &d);
- if(a==0 && b==0 && c==0 && d==0) break;
- int x=0;
- x=((a-b+40)%40) + ((c-b+40)%40) + ((c-d+40)%40);
- printf("%d\n", (x*9)+1080);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment