为什么就40分
查看原帖
为什么就40分
363845
wu_wowo楼主2020/9/28 21:09

好好的按公式打的代码。

#include<bits/stdc++.h>
using namespace std;
int main(){
	float a,b;
	cin>>a;
	b=(pow((1+sqrt(5))/2,a)-pow((1-sqrt(5))/2,a))/sqrt(5);
	printf("%.2f",b);
}
2020/9/28 21:09
加载中...