941-22 guruh. Musobaqa #1
Problem Tasks
# | Date | State |
---|
Not Contest
# | Date | State |
---|
D. Sikl6
Time limit : 1000 ms
Memory limit : 64 mb
Berilgan ketma-ketlikni dastlabki $n$ ta xadi yig’indisini toping
$$S = sin(x) - \frac{1}{2} sin(2x) + \frac{1}{3} sin(3x) - \frac{1}{4} sin(4x) + ... + (-1)^{n-1} \frac{1}{n} sin(nx)$$
Kiruvchi ma’lumotlar:
ikkita butun son $n$ va $x$ $(0 \le n,x \le 9)$;
Chiquvchi ma’lumotlar:
$S$ – ketma-ketlikni dastlabki $n$ ta xadi yig’indisi $10^{-3}$ aniqlikda chiqarilsin.
Input |
---|
0 1 |
Output |
0.000 |
Input |
---|
2 1 |
Output |
0.387 |