151. Triangle Trigonometry

Codeforces
IDCF10269151
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
For this problem, you will be asked to solve specified trigonometry problems. You will be given individual problems that contain sin,cosine,tangent,cosecant,secant, and cotangent. Each test case will specify which operation should be used, using the following keywords: "sin,cos,tan,cosec,sec,cotan". Each test case will also provide the value that should be input into the various trigonometry functions. Your program should output the result of each computation. The first line contains a keyword of the format "sin,cos,tan,cosec,sec,cotan" that signifies which operation should be computed. The second line contains a floating point value that acts as the input to the trigonometry equation. A single floating point value that represents the computation of the input with the given trigonometry equation. ## Input The first line contains a keyword of the format "sin,cos,tan,cosec,sec,cotan" that signifies which operation should be computed. The second line contains a floating point value that acts as the input to the trigonometry equation. ## Output A single floating point value that represents the computation of the input with the given trigonometry equation. [samples]
**Definitions** Let $ f \in \{\sin, \cos, \tan, \csc, \sec, \cot\} $ denote the trigonometric function to be evaluated. Let $ x \in \mathbb{R} $ denote the input angle (in radians). **Constraints** - $ f $ is one of: $ \sin, \cos, \tan, \csc, \sec, \cot $. - $ x $ is a floating-point number such that $ f(x) $ is defined (i.e., domain restrictions respected: e.g., $ \tan(x), \sec(x) \neq \frac{\pi}{2} + k\pi $, etc.). **Objective** Compute and output $ f(x) $.
API Response (JSON)
{
  "problem": {
    "name": "151. Triangle Trigonometry",
    "description": {
      "content": "For this problem, you will be asked to solve specified trigonometry problems. You will be given individual problems that contain sin,cosine,tangent,cosecant,secant, and cotangent. Each test case will ",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269151"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "For this problem, you will be asked to solve specified trigonometry problems. You will be given individual problems that contain sin,cosine,tangent,cosecant,secant, and cotangent. Each test case will ...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ f \\in \\{\\sin, \\cos, \\tan, \\csc, \\sec, \\cot\\} $ denote the trigonometric function to be evaluated.  \nLet $ x \\in \\mathbb{R} $ denote the input angle (in radians).\n\n**Constraints...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments