152. Unit Circle

Codeforces
IDCF10269152
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
The Unit Circle is a very commonly used geometric representation of all possible right triangles with a hypotenuse length of one. If you have not yet encountered the unit circle in math class, the coordinates of each point on the circumference of the circle can be found simply by finding the sin and cosine of the angle created between the point and (0,0). The x value can be found as the cosine of the angle while the y value can be found as the sin of the angle. For this problem, you will be given the angle(from 0 to 359), and you should output the x value. A single integer ranging from 0 to 359 that corresponds to the angle of the point on the unit circle. A single floating point value that represents the x value of the point created on the unit circle by the given angle. ## Input A single integer ranging from 0 to 359 that corresponds to the angle of the point on the unit circle. ## Output A single floating point value that represents the x value of the point created on the unit circle by the given angle. [samples]
Let $\theta \in \{0, 1, 2, \dots, 359\}$ be the given angle in degrees. **Objective** Compute the $x$-coordinate on the unit circle: $$ x = \cos(\theta^\circ) $$
API Response (JSON)
{
  "problem": {
    "name": "152. Unit Circle",
    "description": {
      "content": "The Unit Circle is a very commonly used geometric representation of all possible right triangles with a hypotenuse length of one. If you have not yet encountered the unit circle in math class, the coo",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269152"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "The Unit Circle is a very commonly used geometric representation of all possible right triangles with a hypotenuse length of one. If you have not yet encountered the unit circle in math class, the coo...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "Let $\\theta \\in \\{0, 1, 2, \\dots, 359\\}$ be the given angle in degrees.\n\n**Objective**  \nCompute the $x$-coordinate on the unit circle:  \n$$\nx = \\cos(\\theta^\\circ)\n$$...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments