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 |
拜托各位师兄师姐,为什么我的世界观就和acm不一样呢?帮帮忙指点一下呗#include <iostream> using namespace std; int main() { int x,y,m,n,l,s; while(cin>>x>>y>>m>>n>>l) { if(m>n) if(x<y) s=y-x; else s=y-x+l; else if (x<y) s=l-y+x; else s=x-y; if(s%(m-n)!=0||m==n) cout<<"Impossible"; else if(m>n) cout<<s/(m-n); else cout<<s/(n-m); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator