eolymp
bolt
Try our new interface for solving problems
Problems

Sum of sines

Sum of sines

For the given positive integer $n$ and real number $x$ find the sum $$sin\:x + sin^2 x + \dots + sin^n x$$ \InputFile Two numbers: one integer $n\:(n \le 1000)$ and one real number $x\:(|x| \le 1000)$. \OutputFile Print the value of the sum with $6$ decimal digits.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3 1
Output example #1
2.145368