【题目描述】
【输入】
【输出】
【输入样例】
【输出样例】
#include<iostream> #include<cstdio> using namespace std; int main(){ int n,d=0,s=1,b=1;//q=b,p=s float ok=0; cin>>n; for(int i=1;i<=n;++i){ d=s; s=b; b=s+d; ok+=1.0*b/s; } printf("%.4f",ok); return 0; }//OK
Powered by 孙会中 @ 2024-2026【 www.sunhuizhong.cn 】All rights reserved
访问统计:387751 本月:10 上月:8 今日:1 昨日:1 当前在线:1人