Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7231 - Синус нийлбэр 2

sinx+sin2x+sin3x+...+sinnx нийлбэрийг ол.

Input

Бодит тоо x натурал тоо n нэг мөрөнд зайгаар тусгаарлагдан өгөгдөнө.

Output

Нийлбэр. Таслалаас хойш 3 оронгоор нарийвчлалтайгаар гарга.

Example

Input:
0.5 4

Output:
0.872

Нэмсэн:Bataa
Огноо:2013-01-23
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2019-11-02 06:32:09
#include <cstdio>
#include <cmath>

int main () {
int a , n , i;
double x;
scanf("%lf%d",&x , &n);
double sum = 0;
double l = 1;
for(i = 1 ; i <= n ; i++){
l = l * sin(x);
sum = sum + l;
}
printf("%.3lf" , sum );
}
SUPER
2019-11-02 06:31:50
#include<cstdio>
#include<cmath>
int main(){
int a,n,i;
double x;
scanf("%lf%d", &x , &n);
double sum=0;
double l=1;
for( i=1 ; i<=n ; i++){
l= l* sin(x);
sum= sum + l;
}
printf("%.3lf" , sum);

}
2019-11-02 06:28:56
im wattson legend
2019-11-02 06:26:26
g00d m0rn1ng
2019-11-02 05:36:58
g0dz1lla
2019-11-02 05:36:31
b1rdhunt3r
2019-11-02 05:36:02
lol
2019-10-11 06:05:30
ez
2019-02-27 07:11:40
bodoldoo
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.