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

Re:这么简单怎么是output limit exceeded 啊

Posted by frkstyc at 2005-04-29 16:25:37 on Problem 2413
In Reply To:这么简单怎么是output limit exceeded 啊 Posted by:00448713 at 2005-04-29 16:10:00
ft,你有没有想过F(479)有多少个数字?

> #include<iostream.h>
> void main()
> {
> 	long double a,b;
> 	long double d[480]={1,2};
> 	int i,m;
> 	for(i=2;i<479;i++)
> 		d[i]=d[i-1]+d[i-2];
> 	cin>>a>>b;
> 	while(a!=0||b!=0)
> 	{
> 		m=0;
> 		for(i=0;i<479;i++)
> 			if(d[i]>=a&&d[i]<=b)
> 				m++;
> 		cout<<m<<endl;
> 		cin>>a>>b;
> 	}
> }

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