一洛本谷通 @ 2021-09-04 16:05:36
#include<bits/stdc++.h>
using namespace std;
int n;
int f(int n){
if(n==1||n==2) return n;
else return f(n-1)+f(n-2);
}
int main(){
cin>>n;
cout<<f(n);
return 0;
}
by Yikara @ 2021-09-04 16:07:30
sqlm
by BMTXLRC @ 2021-09-04 16:07:33
?我第一次见到这种tlqtj
by int64 @ 2021-09-04 16:07:54
太强啦!!!
by Carnival @ 2021-09-04 16:08:46
@一洛本谷通
by Apple_Pie @ 2021-09-04 16:09:18
新手给大家提供一个讨论区违规样例,其实错在tlqtj......
by Carnival @ 2021-09-04 16:09:40
竟然有
by Carnival @ 2021-09-04 16:11:11
看看这个吧
by CuSObin_BiNSO4 @ 2021-09-04 16:14:45
不会 tm 递推 只tm 会递归把···
by BqtMtsZDnlpsT @ 2021-09-04 16:20:33
by 庄nnnn额 @ 2021-09-08 21:27:19
你这时间复杂度直线起飞啊,100就爆了。。