标签:des style http color java os strong io
1 2 3 0
1 7 20
#include<iostream> using namespace std; int main() { int a[5000]; a[1]=1; a[2]=7; int i,n; for(i=3;i<=4018;i++) {a[i]=a[i-2]+3*i*(i-1)+1; if(a[i]>2009) a[i]=a[i]%2009;} while(cin>>n,n) { cout<<a[n%4018]<<endl; } return 0; }
标签:des style http color java os strong io
原文地址:http://blog.csdn.net/hpuhjl/article/details/38346607