407180: GYM102697 151 Triangle Trigonometry

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

151. Triangle Trigonometrytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

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.

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.

ExampleInput
sin
2
Output
0.9092974268256817

加入题单

上一题 下一题 算法标签: