| ||||||||||
| 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 | |||||||||
在ai上通过的程序为什么在acm上通不过程序如下,帮忙看一下,谢谢了
#include<stdio.h>
void main(){
int x,y,m,n,L;
int a,b,t;
scanf("%d %d %d %d %d",&x,&y,&m,&n,&L);
for(t=0;;t++){
a=(t*m+x)%L;
b=(t*n+y)%L;
if(m==n){printf("Impossible");break;}
else if(a==b){printf("%d",t);break;}
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator