| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:In Reply To:????????????? Posted by:fucku at 2007-03-13 18:18:12 Result:Accepted
Memory:240K
Time:16MS
#include<iostream>
using namespace std;
int main(void)
{
int d,f,s,t;
while(1)
{
cin>>d>>f>>s>>t;
if(d+f+s+t==0) break;
(f>d)?d=40-(f-d):d=d-f;
(s>f)?d+=(s-f):d+=(40-(f-s));
(t>s)?d+=(40-(t-s)):d+=(s-t);
cout<<1080+d*9<<endl;
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator