Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
15583 | 马德理666 | 【基础题】求和(2) | C++ | Accepted | 0 MS | 244 KB | 178 | 2023-04-23 22:42:27 |
#include<bits/stdc++.h> using namespace std; int main() { float sum=0; for(int i=1;i<=100;i++){ sum+=(float)1/i; } cout<<fixed<<setprecision(3)<<sum; return 0; }