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 hyb8181 at 2006-12-26 09:39:19 on Problem 1061
#include <stdio.h>
#define SIZE 2000000000
int main()
{
	int x, y, m, n, L, t;
	scanf("%d %d %d %d %d", &x, &y, &m, &n, &L);
	if( x != y && x < SIZE && y < SIZE && 0 < m < SIZE && 0 < n < SIZE && 0 < L < SIZE*1.05)
	{
		for(t = 0; t < 10000000; t++)
		{
			if( (x + m*t) % L == (y + n*t) % L)
			{
				printf("%d",t);
				return 0;
			}
		}
	}
	printf("Impossible");
	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