#include<bits/stdc++.h> using namespace std; using ll=long long; int main() { ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); double sum=0; ll cnt=0; for(int i=1;i<=4e8;++i) { sum+=1.0/i; cnt++; if(sum>=15.0)break; } cout<<cnt; return 0; }
By signing up a QFNU-OJ universal account, you can submit code and join discussions in all online judging services provided by us.
Using your QFNU-OJ universal account