| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 5970 | 张志鹏 | 上楼梯 | C++ | Time Limit Exceeded | 0 | 1000 MS | 248 KB | 234 | 2020-08-22 14:10:24 |
#include<bits/stdc++.h> using namespace std; int ans=0,n,x; int f(int a){ if(a==0||a==1) return 1; else return f(a-1)+f(a-2); } int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>x; cout<<f(x)<<endl; } return 0; }