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.|

RGB7230 - Синус нийлбэр 1

sin(x)+sin(x2)+sin(x3)+...+sin(xn) нийлбэрийг ол.

Input

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

Output

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

Example

Input:
2.5 3

Output:
0.648

Нэмсэн: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:23:11
#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*x;
sum= sum +sin(l);
}
printf("%.3lf" , sum);

}
2019-10-30 05:53:48
im am so noooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooobbbbbbbbbbbbbbbbbbbbb











just joking im the pro















you are the nooob
2019-10-30 05:53:19
GG uhererteffd

Last edit: 2019-10-30 05:55:25
2019-04-08 16:23:21 bakhitbek
vb
2019-03-28 10:41:20


Last edit: 2019-03-28 10:42:29
2018-11-02 12:11:05
#include<bits/stdc++.h>
using namespace std;
int main()
{
int n;
float x,b,c=1,a=0;
scanf("%f%d",&x,&n);
for(long long i=1;i<=n;i++){
c=c*x;
b=sin(c);
a=a+b;
}
printf("%.3f",a);
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.