题解 | #字符串的问题#
跳台阶扩展问题
http://www.nowcoder.com/practice/953b74ca5c4d44bb91f39ac4ddea0fee
#include<stdio.h> int fun(int n) { if(n==1) return 1; else return fun(n-1)*2; } int main() { int n; scanf("%d",&n); printf("%d",fun(n)); return 0; }
跳台阶扩展问题
http://www.nowcoder.com/practice/953b74ca5c4d44bb91f39ac4ddea0fee
#include<stdio.h> int fun(int n) { if(n==1) return 1; else return fun(n-1)*2; } int main() { int n; scanf("%d",&n); printf("%d",fun(n)); return 0; }
相关推荐