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 |
怎么会 有time limit?谢谢帮忙#include<iostream> using namespace std; int main(){ int m; int n; int L; int x; int y; int t=1; int i=1; while(cin>>x>>y>>m>>n>>L){} if(m==n){cout<<"Impossible"<<endl;} else { while((x+m*t)%L!=(y+n*t)%L){ i++;t++;} } cout<<i<<endl; return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator