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 |
水过5000,贴代码#include <iostream> #include<algorithm> using namespace std; int main() { int a,b,c,d; while(cin>>a>>b>>c>>d&&a) { c*=100; d*=100; if(a>b) a^=b^=a^=b; if(c>d) c^=d^=c^=d; int ans=min(c/a,d/b); if(ans<100) ans=max(ans,1); else ans=100; cout<<ans<<'%'<<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