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

各位大哥大姐们帮我看一下为什么总是WA呀???

Posted by 2007_lzjtu_LTP at 2007-08-25 16:25:39 on Problem 1061
#include<stdio.h>

main()
{
	int x,y,m,n,l,i;
	scanf("%d",&x);
	scanf("%d%d%d%d",&y,&m,&n,&l);
	if(x!=y&&m>0&&n>0&&l>0&&x<l&&y<l&&x<2000000000&&y<2000000000&&m< 2000000000&&n< 2000000000&&l<2100000000)
	{
		for(i=1;i<100;i++)
		{
			if((x+i*m)%l==(y+i*n)%l)
			{
				printf("%d",i);
				break;
			}
		}
		if(i==100)
			printf("Impossible");
	}
}

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