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 |
我的程序怎么通过不了啊,验证没问题的啊#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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator