| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 55511 | yuboyuan | 求分数序列和 | C++ | Accepted | 1 MS | 240 KB | 249 | 2024-11-07 21:14:29 |
#include<iostream> #include<iomanip> using namespace std; int main() { int n; cin>>n; float x=2,s=0; for(int i=1;i<=n;i++) { s+=x; x=1/x+1; } cout<<fixed<<setprecision(4)<<s; return 0; }