eolymp
bolt
Try our new interface for solving problems
Problems

Cannon

Cannon

At the origin guns and shooting balls of ping-pong. At some distance \textbf{R} from it, parallel to the axis \textbf{ОХ}, is a brick wall of infinite length. Between the wall and the axis \textbf{OX} is objective point with coordinates (\textbf{X},\textbf{Y}). Required to target the gun so that the ball hit his first against the wall, then hit the target. Determine the shortest distance from the axis \textbf{OY} to the point of collision of the ball with the \textit{wall.} \InputFile The first line of the input file contains a number of tests. For each test on a separate line contains three integers, \textbf{R}, \textbf{X} and \textbf{Y} (\textbf{-10}<=\textbf{X}<=\textbf{10}, \textbf{0}<=\textbf{Y}<\textbf{R}<=\textbf{10}), separated by spaces. \OutputFile For each test in a separate line shows the distance in a straight line from the axis \textbf{OY} to the point of impact of the ball against the wall up to two decimal places.
Time limit 1 second
Memory limit 64 MiB
Input example #1
2
10 5 5
10 10 5
Output example #1
3.33
6.67
Source Школа Программиста, Красноярский край, Пятая командная олимпиада, 15 ноября 2009, Задача F