2 solutions
- 1
Information
- ID
- 417
- Time
- 1000ms
- Memory
- 125MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 184
- Accepted
- 43
- Uploaded By
#include<bits/stdc++.h> using namespace std; double n,s,q=2,sum=0; int main(){ cin>>s; while(sum<s){ sum=sum+q; q=q*0.98; n++; } cout<<n; }
By signing up a HFOJ universal account, you can submit code and join discussions in all online judging services provided by us.