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 97xiao at 2009-08-12 20:12:00 on Problem 1061
#include<stdio.h>
int main()
{
 __int64 x,y,m,n,l,i,x1,y1;
 int j=0;
 scanf("%I64d%I64d%I64d%I64d%I64d",&x,&y,&m,&n,&l);
 i=0;
 x1=x;
 y1=y;
 if(x==y)
  printf("0\n");
 else  if(m==n)
   printf("Impossible\n");
 else
 { 
  while(++i)
  {
   x=(x+m)%l;
   y=(y+n)%l;
   if(x==y)
   {
    printf("%I64d\n",i);
    break;
   }
   else if(y==y1) j++;
   else if(x==x1) j++;
   if(j==2)
   {
    printf("Impossible\n");
    break;
   }
   
  }
 }
 return 0;

}


为什么错啦!!!!!!!!!!!!

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