Counterclockwise Rotation

AtCoder
IDabc259_b
Time2000ms
Memory256MB
Difficulty
In an $xy$\-coordinate plane whose $x$\-axis is oriented to the right and whose $y$\-axis is oriented upwards, rotate a point $(a, b)$ around the origin $d$ degrees counterclockwise and find the new coordinates of the point. ## Constraints * $-1000 \leq a,b \leq 1000$ * $1 \leq d \leq 360$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $a$ $b$ $d$ [samples]
Samples
Input #1
2 2 180
Output #1
\-2 -2

When $(2, 2)$ is rotated around the origin $180$ degrees counterclockwise, it becomes the symmetric point of $(2, 2)$ with respect to the origin, which is $(-2, -2)$.
Input #2
5 0 120
Output #2
\-2.49999999999999911182 4.33012701892219364908

When $(5, 0)$ is rotated around the origin $120$ degrees counterclockwise, it becomes $(-\frac {5}{2} , \frac {5\sqrt{3}}{2})$.  
This sample output does not precisely match these values, but the errors are small enough to be considered correct.
Input #3
0 0 11
Output #3
0.00000000000000000000 0.00000000000000000000

Since $(a, b)$ is the origin (the center of rotation), a rotation does not change its coordinates.
Input #4
15 5 360
Output #4
15.00000000000000177636 4.99999999999999555911

A $360$\-degree rotation does not change the coordinates of a point.
Input #5
\-505 191 278
Output #5
118.85878514480690171240 526.66743699786547949770
API Response (JSON)
{
  "problem": {
    "name": "Counterclockwise Rotation",
    "description": {
      "content": "In an $xy$\\-coordinate plane whose $x$\\-axis is oriented to the right and whose $y$\\-axis is oriented upwards, rotate a point $(a, b)$ around the origin $d$ degrees counterclockwise and find the new c",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc259_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "In an $xy$\\-coordinate plane whose $x$\\-axis is oriented to the right and whose $y$\\-axis is oriented upwards, rotate a point $(a, b)$ around the origin $d$ degrees counterclockwise and find the new c...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments