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: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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator