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 |
求助啊#include <cstdio> const int maxn=1000010; int n; long long f[maxn]; int main() { scanf("%d",&n); f[1]=1; f[2]=2; for (int i=3;i<=n;i++) if ( i % 2==1) f[i]=f[i-1]; else { f[i]=(f[i-1]+f[i/2]) ; // f[i]=f[i] % 1000000000; // f[i]=f[i] / 10; } f[n]=f[n] % 1000000000; printf("%I64d\n",f[n]); return 0; } 上面的代码为什么错了? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator