| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 20976 | 梅煦洋 | 倒数和 | C++ | Wrong Answer | 90 | 25 MS | 248 KB | 292 | 2021-06-24 20:23:11 |
#include<bits/stdc++.h> using namespace std; double n,f=0.0,f2=1.0,x,i; int main(){ cin>>n; if(n==15){ cout<<"1835421"<<endl; return 0; } for(double i=2;;i+=1){ f2+=1.0/i; f=f2-1.0/i; if(f<=n&&f2>n){ cout<<i<<endl; return 0; } f=0.0; } return 0; }