标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 48297 Accepted Submission(s): 24705
1 #include<iostream> 2 using namespace std; 3 4 int main() 5 { 6 int a[45],i,n; 7 a[1]=0; 8 a[2]=1; 9 a[3]=2; 10 for(i=4;i<45;i++) 11 a[i]=a[i-1]+a[i-2]; 12 while(cin>>n) 13 { 14 while(n--) 15 { 16 cin>>i; 17 cout<<a[i]<<endl; 18 } 19 } 20 return 0; 21 }
标签:
原文地址:http://www.cnblogs.com/zyx1301691180/p/5722932.html