Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

谁能帮我看看错在哪,先谢谢了,不过觉得这题不难,可能是我想得比较简单吧!请大虾指点指点。

Posted by liuyoulin1 at 2010-08-28 09:29:46 on Problem 1061
#include <iostream.h>
int main()
{
int x,y,m,n,l;
cout<<"请输入A、B的坐标:";
cin>>x>>y;
cout<<"请输入A、B每次跳的步数:";
cin>>m>>n;
cout<<"轨道长度:";
cin>>l;
for(int i=1;i<100000;i++)
{
if((m*i+x)%l==(n*i+l)%l)
{
return i;
}
}
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator