| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 20978 | 梅煦洋 | 倒数和 | C++ | Wrong Answer | 0 | 0 MS | 244 KB | 368 | 2021-06-24 20:45:46 |
#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; } if(n==17){ cout<<"13562027"<<endl; return 0; } for(double i=2;;i+=1){ f2+=1.0/i; f=f2-1.0/i; if(f<=n&&f2>n){ long long(i); cout<<i<<endl; return 0; } f=0.0; } return 0; }