#include using namespace std; vector< pair< double, int > > qs[11][11]; double ans[1000000]; double F(int A, int B, double mid) { return (pow(mid, A) * pow(log(mid), B)); } int main() { int M; scanf("%d", &M); for(int i = 0; i < M; i++) { int A, B; double T; scanf("%d %d %lf", &A, &B, &T); qs[A][B].emplace_back(T, i); } for(int i = 0; i < 11; i++) { for(int j = 0; j < 11; j++) { map< double, double > vv; vv.emplace(0, 0); vv.emplace(1e5, 1e5); for(auto &k : qs[i][j]) { double low = (--vv.lower_bound(k.first))->second, high = vv.lower_bound(k.first)->second; while(high - low > 1e-10) { double mid = (low + high) * 0.5; double v; if(vv.count(mid)) v = vv[mid]; else v = F(i, j, mid); vv.emplace(v, mid); if(v < k.first) low = mid; else high = mid; } ans[k.second] = low; } } } for(int i = 0; i < M; i++) { printf("%.12lf\n", ans[i]); } }