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:CODE here

Posted by lookus at 2005-08-27 03:32:55 on Problem 2440
In Reply To:可以指点一下吗? Posted by:Essence_me at 2005-08-26 23:47:22
#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