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 orbby at 2011-02-05 21:54:16 on Problem 2707
In Reply To:Re:继续水!!! Posted by:like680623 at 2011-02-05 21:36:14
> #include<iostream>
> #include<fstream>
> #include<string>
> using namespace std;
> 
> int main()
> {
> 	double a, b, c, d;
> 	while (cin>>a>>b>>c>>d)
> 	{
> 		if (!a && !b && !c && !d)break;
> 		if ((a <= c && b <= d) || (a <= d && b <= c))
> 		{
> 			printf("100%%\n");
> 			continue;
> 		}
> 		double x = min((c / a), (d / b)) * 100;
> 		double y = min((c / b), (d / a)) * 100;
> 		printf("%d%%\n", (int)max(x, y));
> 	}
> 	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