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 20045076 at 2007-03-14 16:41:07 on Problem 1061
#include<stdio.h>
void main()
{
long x,y,m,n,l,i,d,k;
scanf("%ld %ld %ld %ld %ld",&x,&y,&m,&n,&l);
if(m==n)
printf("Impossible\n");
else
{for(i=1;i<=l;i++)
    {k=x-y+(m-n)*i;
       if((k%l)==0)
	 {d=1;printf("%ld\n",i);break;}
        else d=0;
      }
if(d==0)
printf("Impossible\n");}
}

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