403179: GYM101061 H Robocon Club

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Robocon Clubtime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

Ahmed thought that robotics is fun so he quit ACM and joined Robocon club ! Unfortunately his first task at the Robocon Club did not go as well as he expected. He was supposed to build a robot that moves in a straight line.

The robot he had built consists of a line segment of length L with a wheel of radius R on each of it's endpoints. He placed the robot on the x axis, such that the center of the robot was the point (0, 0) , facing the positive y axis (the left and right wheels are located on and respectively).

The two wheels started moving at the same time, however, instead of moving at the same speed, the left wheel rotated at VL revolutions per second(RPS), while the right wheel rotated at VR RPS. both wheels stopped moving after S seconds. Can you help Ahmed locate the center of his robot?

Input

The first line of the input consists of a single integer T , the number of test cases. T lines follow , each describing a test case consisting of five integers L , R , VL , VR , S . indicating the length of the robot , the radius of each wheel , the speed of the left wheel in (RPS), the speed of the right wheel in (RPS) and the duration that the robot had moved , respectively . where (1 ≤ L ≤ 100 ,1 ≤ R ≤ 100 ,0 ≤ VL ≤ 100 ,0 ≤ VR ≤ 100 , 1 ≤ S ≤ 100 ) .

Output

for each test case print two real numbers on a line separated by a space denotes the coordinates of the center of the robot rounded to three decimal places .

ExampleInput
4
1 1 1 1 1
7 3 2 3 2
10 1 2 1 1
4 3 2 0 1
Output
0.000 6.283
-6.589 -13.682
2.865 8.817
4.000 0.000

加入题单

上一题 下一题 算法标签: