提交时间:2024-11-09 14:30:11
运行 ID: 56135
#include<bits/stdc++.h> using namespace std; int main(){ int m; cin>>m; double result1=m*1.0,result2=m*1.0; for(int i=1;i<10;i++){ result2/=2; int a=1; for(int k=1;k<i;k++){ a*=2; } result1+=1.0*m/a; } cout<<result1<<endl<<result2/2<<endl; return 0; }