| 
 | ||||||||||
| 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 | |||||||||
| 为什么我的会wrong answer?#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: | 
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator