#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; double a,b; for(int k=1;k<=n;k++){ cin>>a>>b; a*=b; cout<<fixed<<setprecision(1)<<a/100*85<<endl; } return 0; }