/* -*- coding: utf-8 -*- * * 1980.cc: No.1980 [Cherry 4th Tune D] 停止距離 - yukicoder */ #include #include #include using namespace std; /* constant */ const int CNT = 200; /* typedef */ /* global variables */ double s(double v, double t, double m) { return v * t + v * v / (20 * m); } /* subroutines */ /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { double t, m, l; scanf("%lf%lf%lf", &t, &m, &l); double v0 = 0.0, v1 = 5100.0 * 1000 / 3600; for (int cnt = 0; cnt < CNT; cnt++) { double v = (v0 + v1) / 2; if (s(v, t, m) <= l) v0 = v; else v1 = v; } double v = v1 * 3600 / 1000; v = floor(v * 100) / 100; printf("%.2lf\n", v); } return 0; }