TLE AC WA AC TLE,求大神
查看原帖
TLE AC WA AC TLE,求大神
317584
mezWindows楼主2020/10/31 10:57
#include<iostream>
#include<iomanip>
using namespace std;
int fib(int n){
	if(n<=2){
		return 1;
	}
	return fib(n-1)+fib(n-2);
}
int main(){
	int x;
	cin>>x;
	cout<<fib(x)<<".00";
	return 0;
}
2020/10/31 10:57
加载中...