| ||||||||||
| 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 | |||||||||
这个有问题吗~~~为什么会wrong answer!#include<stdio.h>
int f(int x,int y)
{ if(x>y)
return x-y;
else return x;
}
main()
{ int x,y,n,m,l,i;
scanf("%d%d%d%d%d",&x,&y,&n,&m,&l);
if(x==y&&x>20000000000&&y>20000000000&&n<0&&m<0&&n>20000000000&&m>20000000000&&l>21000000000)
goto end;
for(i=1;;i++)
{ if(x==y) printf("%d",i-1);break;
x+=n;
y+=m;
x=f(x,l);
y=f(y,l);
if((i-1)>l) printf("Impossible");break;
}
end: ;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator