(defun main (&rest argv) (declare (ignorable argv)) (let* ((*read-default-float-format* 'double-float) (m (read))) (dotimes (_ m) (let* ((a (read)) (b (read)) (c (read))) (format t "~13,11f~%" (cond ((zerop a) (exp (expt c (/ 1d0 b)))) ((zerop b) (expt c (/ 1d0 a))) (t (let* ((logc (log c)) (n 3) (logn (log n)) (f (- (+ (* a logn) (* b (log logn))) logc))) (loop while (> (abs f) double-float-epsilon) do (decf n (/ f (/ (+ a (/ b (log n))) n))) (setf logn (log n) f (- (+ (* a logn) (* b (log logn))) logc)) (loop while (<= n 1d0) do (incf n 0.2d0))) n)))))))) (main)