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 |
Re:测试对,为什么么会超时?1000000000 1888888888 147237 749234 1999999999结果也对In Reply To:测试对,为什么么会超时?1000000000 1888888888 147237 749234 1999999999结果也对 Posted by:alpc0637 at 2008-02-06 12:25:25 > #include<stdio.h> > int main() > { > int x,y,m,n,l,i; > scanf("%d%d%d%d%d",&x,&y,&m,&n,&l); > i=0; > if(x!=y&&m==n) > { > printf("Impossible"); > return 0; > } > while(x!=y) > { > x+=m; > y+=n; > while(x>l) > x-=l; > while(y>l) > y-=l; > i++; > } > printf("%d",i); > return 0; > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator