use std::io; fn main() { let mut input = String::new(); io::stdin().read_line(&mut input).expect("Failed to read input"); let q: i32 = input.trim().parse().expect("Invalid input"); for _ in 0..q { let mut input = String::new(); io::stdin().read_line(&mut input).expect("Failed to read input"); let mut numbers = input.split_whitespace().map(|s| s.parse::().expect("Invalid input")); let a: f64 = numbers.next().unwrap(); let b: f64 = numbers.next().unwrap(); let t: f64 = numbers.next().unwrap(); if a == 0.0 { println!("{}", f64::powf(2.718281828459045, f64::powf(t, 1.0 / b))); continue; } let mut max = 10.0; let mut min = 0.0; let epsilon = 1e-9; while max - min > epsilon { let mid = (max + min) / 2.0; if f64::powf(mid, a) * f64::ln(mid).powf(b) >= t { max = mid; } else { min = mid; } } println!("{}", (max + min) / 2.0); } }