| ||||||||||
| 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:very easy Posted by:abc235153452 at 2010-01-02 10:32:26 > #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");
> }
> }
return 0
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator