| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 70595 | sh25_ganzy | 求分数序列和 | C++ | 通过 | 0 MS | 256 KB | 254 | 2025-10-18 18:07:29 |
#include<bits/stdc++.h> using namespace std; int main(){ float s=0,q=2,p=1,t; int n; cin>>n; for(int i=0;i<n;i++){ s+=q/p; t=p; p=q; q=q+t; } cout<<fixed<<setprecision(4)<<s; return 0; }