Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100980 | 黎瑾萱 | 满足Sn>k的最小n | C++ | Accepted | 1 MS | 280 KB | 154 | 2024-12-14 12:00:42 |
#include<bits/stdc++.h> using namespace std; int main(){ int k,n=1; double sn=0; cin>>k; while(sn<=k){ sn+=1.0/n; n++; } cout<<n-1; }