提交时间:2020-08-16 08:46:20
运行 ID: 5885
#include<bits/stdc++.h> using namespace std; int upstair(int stairs){ if(stairs<=1)return 1; return upstair(stairs-1)+upstair(stairs-2); } int main(){ int n; cin>>n; while(n--){ int a; cin>>a; cout<<upstair(a)<<endl; } return 0; }