#include using namespace std; using ll = long long; int main(){ int N;cin >> N; while(N--){ string _T, _u, _L; cin >> _T >> _u >> _L; _T.erase(find(_T.begin(), _T.end(), '.')); _u.erase(find(_u.begin(), _u.end(), '.')); _L.erase(find(_L.begin(), _L.end(), '.')); ll T = stoi(_T); ll u = stoi(_u); ll L = stoi(_L); ll w = 20 * u; ll Tw36000 = T * w * 36000; ll magic = 3600 * 3600; ll Lw = L * w; ll left = Lw * magic; for(ll V = 600100;V >= 0;V--){ if(left >= V * Tw36000 + V * V * 1000000){ printf("%lld.%02lld\n", V / 100, V % 100); break; } } } return 0; }