#include #include using namespace std; using namespace atcoder; using ll = long long; using mint = modint1000000007; #define rep(i,n) for (int i = 0; i < n; i++) #define rrep(i,n) for (int i = n-1; i >= 0; i--) #define rep2(i,a,b) for (int i = a; i < b; i++) #define rrep2(i,a,b) for (int i = a-1; i >= b; i--) #define rep3(i,a,b,c) for (int i = a; i < b; i+=c) #define rrep3(i,a,b,c) for (int i = a-1; i >= b; i-=c) #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int n; ll t1,t2,u1,u2,l1,l2; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); scanf("%d",&n); rep(i,n){ scanf("%lld.%lld %lld.%lld %lld.%lld",&t1,&t2,&u1,&u2,&l1,&l2); ll l=100*l1+l2,u=100*u1+u2,t=100*t1+t2; ll ok=0,ng=520000; while(ng-ok>1){ ll mid=(ok+ng)/2; if(360*mid*t*u+500*mid*mid<=360*360*l*u)ok=mid; else ng=mid; } if(ok<10)cout<<"0.0"<