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

RGB7236 - Квадрат язгуур доорх 2

(2+(2+...+(2)1/2)1/2...)1/2 илэрхийллийн утгыг ол. 1/2 буюу квадрат язгуур n удаа орно.

Input

Натурал тоо өгөгдөнө.

Output

Илэрхийллийн утга. Таслалаас хойш 9 оронгийн нарийвчлалтай гарга.

Example

Input:
3

Output:
1.961570561

Нэмсэн: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
2022-12-29 05:59:48
oguulbrin oilghgu bh uyd...
2022-01-23 15:46:43
#include<bits/stdc++.h>
using namespace std;
double a,b,c=1,e=0;
int main()
{
scanf("%lf",&a);
while(c<=a)
{
e=sqrt(e+2);
c++;
}
printf("%.9lf",e);
return 0;
}
pzda float double hoyriin yalgaa ni ynda bdi

Last edit: 2022-01-23 15:59:43
2021-11-12 11:01:10
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main() {
int n,i,x;
float s,b;
cin>> n;
b=sqrt(2);
if(n>1){x=n-1;}
else {cout <<sqrt(2);}
for(i=1;i<=x;i++){
s=sqrt(2+b);
b=s;
}
cout<<fixed <<setprecision(9)<<b;
return 0;
}
yu ni bru bgaa ym bl c++
2020-07-01 03:52:27





















































































































































































































































































2019-11-03 06:25:59
#include <cstdio>
#include <cmath>

int main(){
double a , b = 0;
scanf("%lf" , &a);
for(int i = 1 ; i <= a ; i++){
b=sqrt(b+2);
}
printf("%.9lf\n" , b);
}
2019-11-02 14:09:38
#include <cstdio>
#include <cmath>
int main()
{
double a,b=0;
scanf ("%lf",&a);
for(int i=1; i<=a; i++){
b=sqrt(b+2);
}
printf("%.9lf\n",b);
return 0;
}
2019-11-02 07:52:12
ohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohohhoohohohohohohohohohohohohohohohohohohohhhhohohohhohohohohohohohohohohohohohohohohohohhohohohohohohohhohohhohohohohohohohohohohohohohohohohhohh
2019-04-08 17:23:59 bakhitbek
vb
2019-02-27 09:13:30
bi ch gesen
2019-01-24 06:56:48
hereg boloh baih. CPP deer bodson bodolt

#include<iostream>
#include<cmath>
using namespace std;
int main(){
double s =sqrt(2),sum=0;
int n;
cin >> n ;
for(int i=1;i<n;i++){
s=sqrt(s+2);
;
}
cout.setf(ios::fixed);
cout.precision(9);
cout << s << endl ;

}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.