#include <iostream> using namespace std; int a(int n){ if(n<=2){ return n; }else{ return a(n-1)+a(n-2); } } int main(int argc, char** argv) { system("pause"); int N; cin>>N; cout<<a(N)<<endl; return 0; }
标签:std,台阶,cout,int,namespace,青蛙 From: https://www.cnblogs.com/w6826301/p/17594300.html