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:very easyIn Reply To:Re:靠!我这么完美的程序居然不过! Posted by:maxflying at 2005-12-21 15:29:27 #include<stdio.h> int a[100001]; void abc(int n) {int i; a[1]=2; a[2]=3; for(i=3;i<=n;i++) a[i]=a[i-1]+a[i-2]; } int main() {int n,m,i; scanf("%d",&n); for(i=1;i<=n;i++) {scanf("%d",&m); printf("Scenario #%d:\n",i); abc(100000); printf("%d\n",a[m]); if(i!=n)printf("\n"); } } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator