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 <iostream.h> #include <math.h> int main() { long x,y,m,n,L; cin>>x>>y>>m>>n>>L; int i=0; while (1) { if (m==n) { cout<<"Impossible"; break; } i++; x=(x+m)%L; y=(y+n)%L; if (x==y) { cout<<i; break; } else if (i>L/abs(m-n)) { cout<<"Impossible"; 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