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

哪位帮忙看下哪里错了?Output Limit Exceed

Posted by gar at 2005-12-23 19:11:34 on Problem 1061
#include <stdio.h>
void main(){
	int x,y,m,n,l;
	int i,a,b,u;
	char s[11]={'i','m','p','o','s','s','i','b','l','e'};
	scanf("%d%d%d%d%d",&x,&y,&m,&n,&l);
	for(i=1;;i++){
		a=x+m*i;
    	b=y+n*i;
		if(m!=n){
			if(a>b) u=a-b;
			else u=b-a;
			if(u%l==0){
				break;
			    printf("%d",i);
			}
		}
		if(m=n)
			printf("%s\n",s[11]);
	}
}

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