#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 ok = 0; ll ng = 100000000; while(ng - ok > 1){ ll mid = (ok + ng) / 2; if(L * (20 * u) * 10000 >= mid * T * (20 * u) + mid * mid){ ok = mid; }else{ ng = mid; } } ll V = ok * 3600; V /= 100000; printf("%lld.%02lld\n", V / 100, V % 100); } return 0; }