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 |
各位大哥大姐们帮我看一下为什么总是WA呀???#include<stdio.h> main() { int x,y,m,n,l,i; scanf("%d",&x); scanf("%d%d%d%d",&y,&m,&n,&l); if(x!=y&&m>0&&n>0&&l>0&&x<l&&y<l&&x<2000000000&&y<2000000000&&m< 2000000000&&n< 2000000000&&l<2100000000) { for(i=1;i<100;i++) { if((x+i*m)%l==(y+i*n)%l) { printf("%d",i); break; } } if(i==100) printf("Impossible"); } } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator