1 #include <iostream> 2 using namespace std; 3 int a(int c){ 4 if(c<=2){ 5 return c; 6 }else{ 7 return a(c-1)+(c-2); 8 } 9 } 10 int main(int argc, char** argv) { 11 int c,k; 12 cin>>c; 13 cout<<a(c); 14 return 0; 15 }
标签:std,13,cout,int,壁灯,楼梯 From: https://www.cnblogs.com/wangyanbo111/p/17594305.html