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

RGB7235 - Квадратын урвуу үржвэр

(1+1/12)*(1+1/22)*...*(1+1/n2) үржвэрийг ол.

Input

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

Output

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

Example

Input:
3

Output:
2.778

Нэмсэн: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
2024-03-16 09:16:19
jkl;jkl;jkl;jkl;
2024-02-16 12:02:17


Last edit: 2024-02-21 10:27:53
2024-02-16 12:02:16


Last edit: 2024-02-21 10:28:02
2024-01-05 16:17:35
import java.util.*;
import java.lang.*;

class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner in = new Scanner(System.in);
int a=in.nextInt();
double result=1.0;
int j=0;
int i=1;
while(i<=a){
j=i*i;
result = result * (1.0+1.0/j);
i++;
}
System.out.printf("%.3f",result);
}
}
2023-03-02 06:10:00
#include<stdio.h>
#include<cmath>
main()
{
float a,b,c,d,e;
scanf("%f",&a);
b=1; d=1;
while(b<=a)
{
c=1+(1/pow(b,2));
d=d*c;
b=b+1;
}
printf("%.3f",d);
}
boogiid
2022-01-23 14:35:54
#include<bits/stdc++.h>
using namespace std;
float a,b=1,c,d=1,e;
int main()
{
scanf("%f",&a);
while(b<=a)
{
c=1+(1/pow(b,2));
d=d*c;
b++;
}
printf("%.3f",d);
return 0;
}
dahiad bi hha
2021-10-20 13:45:23
stop huulah
2020-03-13 15:05:00
#include<bits/stdc++.h>
using namespace std;
main ()
{

double a,n,b,i,d,c,e=0;

cin>>n;

b=1;

for(d=1; d<=n; d++) {
b = b*(1+(1/(d*d)));
}

printf("%.3lf",b);
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.