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-12-12 12:53:59
KURWA BOBR
2024-12-05 09:17:59
#include<iostream>
#include<cmath>
#include<iomanip>
using namespace std;
int main(){
int n;
cin>>n;
double b=1,s=1;
for(int i=0;i<=n;i++){
b=(1+1/(pow(n,2)));
s=b*s;
}
cout<<fixed<<setprecision(3)<<s;
} //mai suuguudaa _!_/
2024-11-20 15:51:37
#include<bits/stdc++.h>
using namespace std;
int main(){
double n,i,s=1,sum=1;
cin>>n;
for(i=1;i<=n;i++){
sum=1+(1/pow(i, 2));
s=s*sum;
}
cout<<fixed<<setprecision(3)<<s;
}

Last edit: 2024-11-20 15:52:17
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
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.