Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:

Posted by SRN at 2013-11-26 02:27:00 on Problem 2304
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator