#abc259b. B - Counterclockwise Rotation
B - Counterclockwise Rotation
Score : points
问题陈述
在坐标系为 的平面中,其中 轴朝右方向, 轴向上方向,将一个点 绕原点逆时针旋转 度,并求出该点旋转后的新坐标。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
In an -coordinate plane whose -axis is oriented to the right and whose -axis is oriented upwards, rotate a point around the origin degrees counterclockwise and find the new coordinates of the point.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Let the new coordinates of the point be . Print and in this order, with a space in between.
Your output will be considered correct when, for each value printed, the absolute or relative error from the answer is at most .
Sample Input 1
2 2 180
Sample Output 1
-2 -2
When is rotated around the origin degrees counterclockwise, it becomes the symmetric point of with respect to the origin, which is .
Sample Input 2
5 0 120
Sample Output 2
-2.49999999999999911182 4.33012701892219364908
When is rotated around the origin degrees counterclockwise, it becomes .
This sample output does not precisely match these values, but the errors are small enough to be considered correct.
Sample Input 3
0 0 11
Sample Output 3
0.00000000000000000000 0.00000000000000000000
Since is the origin (the center of rotation), a rotation does not change its coordinates.
Sample Input 4
15 5 360
Sample Output 4
15.00000000000000177636 4.99999999999999555911
A -degree rotation does not change the coordinates of a point.
Sample Input 5
-505 191 278
Sample Output 5
118.85878514480690171240 526.66743699786547949770
update @ 2024/3/10 10:59:05