2 solutions
- 1
Information
- ID
- 576
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- # Submissions
- 36
- Accepted
- 28
- Uploaded By
通俗易懂!!!
#include <bits/stdc++.h>
using namespace std;
int main()
{
double h,s=0;
cin>>h;
for(int i=1;i<=10;i++)
{
s+=h;
h/=2;
s+=h;
}
cout<<s-h<<endl<<h;
return 0;
}
By signing up a ZXOJ universal account, you can submit code and join discussions in all online judging services provided by us.