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

这个有问题吗~~~为什么会wrong answer!

Posted by silvia at 2010-07-01 18:50:58 on Problem 1061
#include<stdio.h>
int f(int x,int y)
{ if(x>y)
 return x-y;
  else return x;
}
main()
{ int x,y,n,m,l,i;
  scanf("%d%d%d%d%d",&x,&y,&n,&m,&l);
  if(x==y&&x>20000000000&&y>20000000000&&n<0&&m<0&&n>20000000000&&m>20000000000&&l>21000000000)
     goto end;
  for(i=1;;i++)
  { if(x==y) printf("%d",i-1);break;
    x+=n;
   y+=m;
   x=f(x,l);
   y=f(y,l);
       if((i-1)>l) printf("Impossible");break;
  }
end: ;
}



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