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 |
那边的数据也就逗你玩玩,这里才是拼真刀真枪的In Reply To:在ai上通过的程序为什么在acm上通不过 Posted by:yying at 2005-12-25 20:46:32 > 程序如下,帮忙看一下,谢谢了 > #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