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