#P10519. Clothes Displacement in a Washing Machine
Clothes Displacement in a Washing Machine
Clothes Displacement in a Washing Machine
Rana and Tomorin observed that the clothes inside a washing machine perform uniform circular motion. They know the initial position of the clothes, the observation time, and the washing machine's rotational speed. Consider the clothes as a point mass. Your task is to compute the displacement (the straight-line distance between the initial position and the position at the end of the observation).
Assume the clothes rotate about the origin. The initial position is given as coordinates \((x, y)\). The washing machine's rotational speed \(v\) is given in revolutions per minute (rpm), and the observation time \(T\) is given in seconds. The rotation angle \(\theta\) (in radians) during the observation is calculated by:
The clothes rotate by \(\theta\) about the origin. If \((x', y')\) is the final position, then:
$$\begin{aligned} x' &= x \cos\theta - y \sin\theta,\\ y' &= x \sin\theta + y \cos\theta. \end{aligned}$$The displacement \(d\) between the initial and final positions is:
inputFormat
The input consists of three lines:
- The first line contains two floating-point numbers \(x\) and \(y\), representing the initial coordinates of the clothes.
- The second line contains a floating-point number \(T\), the observation time in seconds.
- The third line contains a floating-point number \(v\), the washing machine's rotational speed in revolutions per minute (rpm).
outputFormat
Output the displacement \(d\) as a floating-point number with 6 decimal places.
sample
1.0 0.0
15
60
0.000000