#include <bits/stdc++.h>
using namespace std;
int main() {
int m;cin>>m;
while(m--){
vector<float>v;
float H,n,sum=0;
cin>>H>>n;
for(int i =0;i<n;i++){
v.push_back(H);
v.push_back(H/2);
H/=2;
}
for(int i =0;i<v.size()-1;i++)
sum+=v[i];
cout<<fixed<<setprecision(2)<<sum<<endl;
}
}
// 64 位输出请用 printf("%lld")
qd

京公网安备 11010502036488号