| ||||||||||
| 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 | |||||||||
再水一個#include <stdio.h>
void j(int &A,int &B){
int t=A;A=B;B=t;
}
int m(int a,int b){
return a>b?b:a;
}
int main() {
int A,B,C,D;
char b='%';
while(1){
scanf("%d%d%d%d",&A,&B,&C,&D);
if(!A)break;
if((B-A)>>31)j(A,B);
if((D-C)>>31)j(C,D);
int p=m(100*C/A,100*D/B),r=((p-100)>>31)?p:100;
printf("%d%c\n",r,b);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator