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 hawk at 2004-12-22 19:12:24 on Problem 1207
In Reply To:请教师兄:为什么总是out put exeed啊? Posted by:19860825 at 2004-12-22 14:18:31
int main(){
	int i,j,a[10000],max,k,e,d,q;
	while(scanf("%d %d",&i,&j)==2){
		d=j-i;
		q=i;
	    for(k=0;k<=d+1;k++){
			a[k]=cycle(i);
			i=i+1;
		}
		max=a[0];
		for(k=0;k<=d+1;k++){
			if(max<=a[k+1]) max=a[k+1];
		}
		printf("%d %d %d\n",q,j,max);
	}
	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