| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 325107 | 小林老师 | 【C2-4】求恰好使s=1+1/2+1/3+…+1/n的值大于X时n的值。 | C++ | Accepted | 100 | 1 MS | 248 KB | 175 | 2025-06-01 21:44:37 |
#include<iostream> using namespace std; int main(){ int x; double s = 0, i = 0; cin >> x; while(s<x){ i++; s = s + 1.0 / i; } cout << i; return 0; }