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

求大神帮看看,用的分类,代码简单不知道哪的问题通不过

Posted by yangyang823 at 2013-03-30 16:46:27 on Problem 2586
#include<iostream>

using namespace std;

int main()
{
	unsigned int s, d;
	while(cin>>s>>d)
	{
		if (d > 4*s && d < 5*s)
		{
			cout<<10*s - 2*d<<endl;
		}
		else if (2*d > 3*s && 2*d < 4*s)
		{
			cout<<8*s - 4*d<<endl;
		}
		else if (3*d > 2*s && 3*d < 3*s)
		{
			cout<<6*s - 6*d<<endl;
		}
		else if (12*d > 3*s && 12*d < 4*s)
		{
			cout<<3*s - 9*s<<endl;
		}
		else
		{
			cout<<"Deficit"<<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