| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:CODE hereIn 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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator