| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 443172 | 王璟源 | 【C2-4】求恰好使s=1+1/2+1/3+…+1/n的值大于X时n的值。 | C++ | 解答错误 | 0 | 1 MS | 248 KB | 155 | 2026-06-03 19:33:28 |
#include <bits/stdc++.h> using namespace std; int main(){ float x,s=0; int i=1; while(s<=x){ s=s+1/i; i++; } cout<<i; return 0; }