| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132545 | 李亭绪 | 13分数求和 | C++ | Accepted | 1 MS | 268 KB | 280 | 2025-10-08 19:46:14 |
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> using namespace std; double n,fm,fz,fm0=1,fz0=2,s=2; int main(){ cin>>n; for(int i=2;i<=n;i++) { fm=fz0; fz=fm0+fz0; s+=fz/fm; fm0=fm; fz0=fz; } printf("%.4lf",s); }