Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
129638 ...... 级数求和 C++ 通过 100 48 MS 236 KB 205 2024-01-27 09:19:21

Tests(4/4):


#include<bits/stdc++.h> using namespace std; int main() { int n=0; double m; cin>>m; double sum=0,i=0; while(sum<m) { i++; sum+=1/i; n++; if(sum>m) { break; } } cout<<n<<endl; }


测评信息: