标签:blog io ar for div log c amp r
#include<stdio.h> int main () { int n,m,i,a[41]; while(scanf("%d",&n)!=EOF&&n>0) { a[0]=0; a[1]=0; a[2]=1; a[3]=2; for(i=4;i<=40;i++) a[i]=a[i-1]+a[i-2]; while(n--) { scanf("%d",&m); printf("%d\n",a[m]); } } return 0; }
标签:blog io ar for div log c amp r
原文地址:http://www.cnblogs.com/wuyuewoniu/p/3961810.html