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 Essence_me at 2005-08-27 10:50:46 on Problem 2440
In Reply To:Re:CODE here Posted by:lookus at 2005-08-27 03:32:55
> #include <iostream.h>
> void main()
> {
> 	int n,i,a[200]={1,2,4,6};
> 	for(i=4;i<200;++i)
> 		a[i]=(a[i-1]+a[i-3]+a[i-4])%2005;
> 	while(cin>>n)
> 		cout<<a[n%200]<<endl;
> }

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