John is bored on a long summer day. He takes a ball and tosses it upwards into the air, catching it when it comes back down. If he throws the ball with greater speed, it travels higher into the air before falling back down into his hands. John wonders how high the ball is travelling and at what speed he's actually throwing the ball, but all he has to take measurements is his wristwatch.
If John throws a ball straight upwards which takes T seconds before returning to the ground, what was the initial velocity when the ball left John's hands, and was the maximum height reached by the ball during it's travel?
Assume the height of the ball is 0 when it is released from John's hands, and he
catches the ball again at exactly this height.
Assume acceleration due to gravity is constant g = -9.8 m/s^2
Assume air resistance is not a factor.
Input Data
First line is Q, the quantity of testcases.
Q lines then follow, each with a single value T being the amount of
time the ball is in the air, in seconds.
Answer
Should consist of space-separated values corresponding to the initial
velocities (in meters per second) and maximum heights (in meters) of each toss.
Error should be less than 1e-6.
Example
input data:
2
1.234
9.876
answer:
6.0466 1.865376 48.3924 119.480836