| ||||||||||
| 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>
int main()
{
__int64 x,y,m,n,l,i,x1,y1;
int j=0;
scanf("%I64d%I64d%I64d%I64d%I64d",&x,&y,&m,&n,&l);
i=0;
x1=x;
y1=y;
if(x==y)
printf("0\n");
else if(m==n)
printf("Impossible\n");
else
{
while(++i)
{
x=(x+m)%l;
y=(y+n)%l;
if(x==y)
{
printf("%I64d\n",i);
break;
}
else if(y==y1) j++;
else if(x==x1) j++;
if(j==2)
{
printf("Impossible\n");
break;
}
}
}
return 0;
}
为什么错啦!!!!!!!!!!!!
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator