Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
101000 | 魏宏搏 | 满足Sn>k的最小n | C++ | Accepted | 1 MS | 272 KB | 194 | 2024-12-14 12:02:09 |
#include<iostream> using namespace std; int main(){ double sn=0; int n=1,k; cin>>k; while(sn<=k){ sn+=1.0/n; n++; } cout<<n-1; return 0; }