Problem:
 Score : 200 points    Problem Statement Given is a sequence of N integers A_1, \ldots, A_N .  Find the (multiplicative) inverse of the sum of the inverses of these numbers, \frac{1}{\frac{1}{A_1} + \ldots + \frac{1}{A_N}} .      Constraints  1 \leq N \leq 100  1 \leq A_i \leq 1000         Input Input is given from Standard Input in the following format:  N  A_1  A_2  \ldots  A_N       Output Print a decimal number (or an integer) representing the value of \frac{1}{\frac{1}{A_1} + \ldots + \frac{1}{A_N}} .  Your output will be judged correct when its absolute or relative error from the judge's output is at most 10^{-5} .        Sample Input 1 2
10 30      Sample Output 1 7.5  \frac{1}{\frac{1}{10} + \frac{1}{30}} = \frac{1}{\frac{4}{30}} = \frac{30}{4} = 7.5 .  Printing 7.50001 , 7.49999 , and so on will also be accepted.       Sample Input 2 3
200 200 200      Sample Output 2 66.66666666666667  \frac{1}{\frac{1}{200} + \frac{1}{200} + \frac{1}{200}} = \frac{1}{\frac{3}{200}} = \frac{200}{3} = 66.6666... .  Printing 6.66666e+1 and so on will also be accepted.       Sample Input 3 1
1000      Sample Output 3 1000  \frac{1}{\frac{1}{1000}} = 1000 .  Printing +1000.0 and so on will also be accepted.

Solution (Python):
n = int(input())
a = tuple(map(int, input().split()))
x = 1
for i in a:
    x *= i
y = 0
for i in a:
    y += x // i
print(x / y)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
sum = 0
for i in range(n):
    sum += 1 / a[i]
print(1/sum)

Solution (Python):
def actual(n, A):
    return 1 / sum([(1 / x) for x in A])

n = int(input())
A = list(map(int, input().split()))

print(actual(n, A))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

S = 0
for i in A:
    S += 1/i

print(1/S)

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
A_r = [1/a for a in A]
print(1/sum(A_r))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
s = 0
for i in range(n):
    s += 1/a[i]
print(1/s)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
B = [0] * N
for i in range(N):
  B[i] = 1 / A[i]
print(1 / sum(B))

Solution (Python):
N = int(input())
As = list(map(int, input().split()))
As_gyaku = [1 / i for i in As]
As_gyaku_sum = sum(As_gyaku)
print(1 / As_gyaku_sum)

Solution (Python):
N = int(input())
As = list(map(int, input().split()))
bunbo = 1
for i in As:
    bunbo *= i
bunshi_list = []
for i in As:
    bunshi_list.append(bunbo // i)
print(bunbo / sum(bunshi_list))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for e in a:
  ans += 1 / e
ans = 1 / ans
print(ans)

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
pans = 0
for i in A:
    pans += 1 / i
print(1 / pans)

Solution (Python):
N = int(input())
A = list(map(int, input().split(' ')))
denominator = 0
for val in A:
  denominator += 1 / val
res = 1 / denominator
print(res)

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


def solve():
    N = int(input())
    A = list(map(int, input().split()))

    ans = 0

    for i in range(N):
        ans += 1 / A[i]

    ans = 1 / ans
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
s=0
for x in l:
    s+=1/x
print(1/s)

Solution (Python):
n=int(input())
a=[int(i) for i in input().split()]
aa=[1/i for i in a]
print(1/sum(aa))

Solution (Python):
n=int(input())
li=list(map(int,input().split()))
m=0
for i in li:
    m+=1/i
print(1/m)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 1
l = []
for i in range(n):
  ans = ans*a[i]
for i in range(n):
  l.append(ans/a[i])
print(ans/sum(l))

Solution (Python):
n = int(input())
ans = 0
for i in map(int,input().split()):
    ans += 1/i
print(1/ans)

Solution (Python):
def main():
    n = int(input())
    a = map(int, input().split())
    x = []
    for i in a:
        x.append(1/i)
    print(1/sum(x))
    
if __name__ == "__main__":
    main()

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()

def main():
    n = int(input())
    a = list(map(int, input().split()))
    sum = 0
    for i in a:
        sum += 1/i
    print(1/sum)
    
    
main()

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
ans=0
for i in l:
    ans+=1/i
print(1/ans)

Solution (Python):
N=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(N):
    a[i]=1/a[i]

for j in range(N):
    ans+=a[j]

print(1/ans)

Solution (Python):
n = int(raw_input())
ais = map(int, raw_input().split(' '))
cumul = [0,1]
"""
a    b
15 = 6 x 2 + 3
b    a%b

a    b       a%b
6  = 3 x 1 + 0
b    a%b

a   b
3   0

"""
def gcd(a,b):
	return gcd(b, a % b) if b else a
	
for a in ais:
	b,c = cumul
	
	

	cumul = [c + a*b, a*c]
	g = gcd(cumul[0], cumul[1])
	cumul = [cumul[0]/g, cumul[1]/g ]

print float(cumul[1])/cumul[0]

Solution (Python):
def resolve():
    N = int(input())
    all = list(map(int, input().split()))
    ans = 0
    for i in all:
        mom = 1/i
        ans += mom
    dad = 1/ans
    print(dad)
resolve()

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in a:
    x=1/i
    ans+=x
print(1/ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in a:
    x=1/i
    ans+=x
print(1/ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
ans=0
for i in range(N):
  ans+=1/A[i]
print(1/ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

A_inv = [1]*N

for i in range(N):
    A_inv[i] = 1/A[i]
    
ans = 1/sum(A_inv)
print(ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = 0
for i in range(n):
    b += float(1/a[i])
print(float(1/b))

Solution (Python):
n = int(input())

lis = map(int,input().split())

total = 0
for i in lis:
    total += 1/i
    
print(1/total)

Solution (Python):
n = int(input())
a = list( map(int,input().split()) )

x = 0
for i in a:
  x += 1 / i

print(1 / x)

Solution (Python):
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())
def lim(N):
    return [int(input()) for i in range(N)]

N = ii()
A = li()

bunbo = 0

for i in range(N):
    bunbo += 1 / A[i]

print(1 / bunbo)

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    a = list(map(int, input().split()))

    num = 1
    for ai in a:
        num *= ai

    den = sum([num // a[i] for i in range(n)])

    print(num / den)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n):
    ans=ans+1/a[i]
print(1/ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
s = sum([1 / x for x in a])
print(1 / s)

Solution (Python):
import sys
sys.setrecursionlimit(10**6)

n = int(input())
A = list(map(int, input().split()))

tmp = sum([1/a for a in A])
print(1/tmp)

Solution (Python):


import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())))

ans = 0

print(1/np.sum(1/a))

Solution (Python):

n = int(input())
s = list(map(int, input().split()))
a = 0
for i in s:
    a += 1/i
print(1/a)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = 0
for i in a:
    b += 1/i
print(1/b)

Solution (Python):

import sys
input = sys.stdin.readline









N = int(input())
A = list(map(int,input().split()))

ans = 0
for a in A:
    ans += 1/a

print(1/ans)

Solution (Python):
n = int(input())
A = [int(x) for x in input().split()]

all_b = 0
for i in range(n):
    all_b += (1/A[i])

print(1/all_b)

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
print (1/sum(1/a for a in A))

Solution (Python):
n = input()
n_int = int(n)
a = input().split()
y = 0

for i in range(n_int):
  x = int(a[i])
  y += 1/x

print(1/y)

Solution (Python):
import sys
sys.setrecursionlimit(100000)

def solve(x,a,ans=0):
  if x == 0:
    return ans
  else:
    return solve(x-1,a[1:],ans+1/a[0])
  
N = int(input())
a = list(map(int,input().split()))

print(1/solve(N,a))

Solution (Python):
n = int(input())
apple = list(map(int, input().split()))
c = 0
for i in apple:
    c += (1 / i)
print(1 / c)

Solution (Python):
N = int(input())
Alist = list(map(int, input().split()))


def inverse(num):
    return 1/num


invAlist = []

for a in Alist:
    invAlist.append(inverse(a))


print(inverse(sum(invAlist)))

Solution (Python):

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    N = int(readline())
    As = map(int, readline().split())
    ans = 0
    for a in As:
        ans += 1 / a
    print(1/ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

print(1/sum(map(lambda x: 1/x, A)))

Solution (Python):
n = int(input())
a = map(int, input().split())
print(1/sum(map(lambda x: 1/x, a)))

Solution (Python):
n = int(input())
a= list(map(int,input().split()))

b= list(map(lambda x:1/x, a))

print(1/sum(b))

Solution (Python):
n = int(input())
a = map(int, input().split())

ans = 1 / sum(1 / x for x in a)
print(ans)

Solution (Python):
def main():
    n = input()
    t = list(map(int, input().split()))
    t = [1/v for v in t]
    ans = 1/sum(t)
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
sum=0
for i in a:
  sum+=1/i
print(1/sum)

Solution (Python):
N = int(input())
A = tuple(map(int, input().split(' ')))
s = 0
for a in A:
    s += 1 / a

print(1 / s)

Solution (Python):
n=int(input())
a=[int(x) for x in input().split()]
 
ans=0
for i in a:
  ans+=1/i
print(1/ans)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
sum1 = 0
for i in range(0,N,1):
    sum1 += 1/A[i]
print(1/sum1)

Solution (Python):
n =  int(input())
a =list(map(int,input().split()))
rev_a=[]
b=0
       

for i in a:
    j = 1 / i
    rev_a.append(j)
b=0
for k in rev_a:
    b += k

print(1/b)

Solution (Python):
N = int( input() )
A = list( map( int, input().split() ) )

bunbo = 0
for a in A:
  bunbo += 1 / a
print( 1 / bunbo )

Solution (Python):
N = int(input())
B = 0
for a in list(map(int, input().split())):
    B += 1/a
print(1/B)

Solution (Python):
n = int(input())
list_a = [int(x) for x in input().split()]
b = 0

for i in range(n):
    b += 1/list_a[i]

print(1/b)

Solution (Python):
n=int(input())
a=map(int,input().split())
print(1/sum(1/i for i in a))

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
ans=0
for a in A:
  ans+=(1/a)
ans=1/ans
print(ans)

Solution (Python):
n = int(input())
a = [int(i) for i in input().split()]
ans = 0

for i in range(n):
	a[i] = 1/a[i]
	ans += a[i]
print(1/ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

sum_tmp = 0
for i in range(N):
    sum_tmp += 1/A[i]

print(1/sum_tmp)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
AR = 0
for i in range(N):
    AR += 1/A[i]
print(1/AR)

Solution (Python):
N = int(input())
array = list(map(int, input().split()))

print(
    1 / sum(1/A for A in array)
)

Solution (Python):
def main():
    n = int(input())
    a = list(map(int,input().split()))
    res = 0.0
    for i in a:
        res += 1/i
    print(1/res)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
result = [1/i for i in A]
result = 1 / sum(result)
print(result)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
deno = 0
for i in a:
    A = 1/i
    deno += A
print(1/deno)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
ansmae=0
for i in range(N) :
    ansmae+=1/A[i]
print(1/ansmae)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in a:
	ans += 1/i
	
print(1 / ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0

for i in A:
    ans += 1/i
print(1/ans)

Solution (Python):
import sys
from fractions import gcd
N=int(sys.stdin.readline().strip())
A=map(int, sys.stdin.readline().split())
for i,a in enumerate(A):
    if i==0:
        a_gcd=a
    else:
        a_gcd=gcd(a_gcd,a)

a_lcm=a_gcd
for a in A:
    a_lcm*=a/a_gcd

bunbo=0
for a in A:
    bunbo+=a_lcm/a

print float(a_lcm)/bunbo

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans = 0
for Ai in A:
  ans += 1/Ai

print(1/ans)

Solution (Python):
import numpy as np

N = int(input())

A = np.array(input().split(), dtype=np.float64)
ans = 1 / (1/A).sum()

print(ans)

Solution (Python):
import numpy as np

N = int(input())
A = list(map(int, input().split()))

A = np.array(A)
B = 1 / A
C = B.sum()
print(1/C)

Solution (Python):
import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
a = list(map(int,input().split()))
lcm = lcm_list(a)
d = [0]*n

for i in range(n):
    d[i] = lcm//a[i]

print(lcm/sum(d))

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in range(n):
  ans+=1/a[i]
print(1/ans)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for a_i in a:
    ans += 1/a_i
print(1/ans)

Solution (Python):
n = int(input())

l = list(map(int, input().split()))

value = 0

for i in l:
    value = value+1/i

print(1/value)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 9)

def main():
    n = int(input())
    a = list(map(int, input().split()))
    x = 1
    for i in a:
        x *= i
    y = 0
    for i in a:
        y += x // i
    print(x / y)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
arr = list(map(int, input().split()))

bunbo = 0
for i in range(len(arr)):
    bunbo += 1/arr[i]

print(1/bunbo)

Solution (Python):
input()
a = list(map(int, input().split()))
print(1 / sum(1 / ai for ai in a))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

a = 1
for i in A:
    a *= i
b = 0
for j in A:
    b += a / j

print(a/b)

Solution (Python):
n=int(input())
r=0
a=[0]*n

def lambda_a(s):
  return 1/int(s)

a[:]=map(lambda_a,input().split())
for ii in range(n):
  r+=a[ii]
print(1/r)

Solution (Python):
N=int(input())
List = list(map(int, input().split()))

ans=0
i=0
while i<N:
    
    ans+=(1/List[i])
    
    i+=1

print(1/ans)

Solution (Python):
n = int(input())
V = list(map(int, input().split()))
a = V[0]

print(1/sum([1/i for i in V]))

Solution (Python):
n = int(input())
V = list(map(int, input().split()))
a = V[0]

print(sum([i**(-1) for i in V])**(-1))

Solution (Python):

N = int(input())
A = list(map(int, input().split()))

print(1 / sum([1 / a for a in A]))

Solution (Python):
N = int(input())
A = [int(N) for N in input().split()]
temp = 0

for i in range(0,N):
  temp=temp+(1/A[i])
print(1/temp)

Solution (Python):
n = int(input().rstrip())
a = [int(i) for i in input().rstrip().split()]
v = 0.0
for i in range(len(a)):
	v = v + 1 / a[i]

print(1 / v)

Solution (Python):

"""
Created on Fri May 15 00:22:18 2020

@author: Kanaru Sato
"""

n = int(input())
a = list(map(int,input().split()))

mot = 0.0
for i in range(n):
    mot += 1/a[i]
print(1/mot)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
 
for i in range(N):
    A[i] = 1 / A[i]
 
print(1 / sum(A))

Solution (Python):
n = int(input())
A = list(map(int,input().split()))

gyaku = 0
for a in A:
    gyaku += 1/a
        
print(1/gyaku)

Solution (Python):

n=int(input())
a=[int(x) for x in input().split()]

sumation=0
for x in a:
    sumation+=1/x
    
print(1/sumation)

Solution (Python):
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

def main():
    N = int(readline())
    A = [int(i) for i in readline().split()]

    ans = 0
    tmp = 0
    for a in A:
        tmp += 1 / a
    
    ans = 1 / tmp
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
A_inv = [1 / a for a in A]
print(1 / sum(A_inv))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
sum = 0
for i in range(n):
    sum += 1/a[i]

print(1/sum)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
a = 0
for i in l:
    N = 1/i
    a += N
print(1/a)

Solution (Python):
n = int(input())
l = list(map(int, input().split()))
a = 0

for i in range(n):
  b = 1 / l[i]
  a = a+b

a = 1 / a
  
print(a)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    ans += 1 / a[i]
print(1 / ans)

Solution (Python):
import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
print(1 / sum(1 / a))

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
count = a[0]
num = 1

for i in range(1, len(a)):
    num = num * a[i] + count
    count *= a[i]

print(count/num)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
ans=0
for i in range(n):
    ans+=1/l[i]
print(1/ans)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
s = 0

for i in A:
  s += 1 / i
  
print(1 /s)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    ans += 1/a[i]
print(1/ans)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))

tmp = 0

for i in range(N):
    tmp += 1/A[i]
    
print(1/tmp)

Solution (Python):
n=int(input())
l=list(map(int,input().split()))
sum=0
for ll in l:
  sum+=1/ll
print(1/sum)

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)





N = input()
A = inputIL()

print(1/sum(1/x for x in A))

Solution (Python):
N = int(input())
A = list(input().split())
A = [int(A[i]) for i in range(N)]

mother = 0

for i in range(N):
    mother += 1 / A[i]

print(1 / mother)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
b = [1/a[i] for i in range(n)]
print(1/(sum(b)))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    ans += 1/a[i]
print(1/ans)

Solution (Python):
N = int(input())
As = list(map(int, input().split()))

ans = 1/sum([1/A for A in As])
print(ans)

Solution (Python):


n = int(input())
a = list(map(int, input().split()))
print(1/sum([1/b for b in a]))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
SUM = 0
for a in A:
    SUM += (1/a)

print(1/SUM)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
b = list(1/i for i in a)
print(1/(sum(b)))

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
rev_A = []
for i in range(n):
    rev_a = 1 / A[i]
    rev_A.append(rev_a)
print(1/ sum(rev_A))

Solution (Python):
N= int(input())
A =([1 / int(i) for i in (input().split())])
print(1/sum(A))

Solution (Python):
N = int(input())
A = map(int, input().split())
A = [1 / i for i in A]


print(1/sum(A))

Solution (Python):
n=int(input())
a=[]
a+=list(map(int,input().split()))
temp=0
for i in range(0,n):
  temp=temp+1/a[i]
print(1/temp)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
b=[1/a[i] for i in range(n)]
print(1/sum(b))

Solution (Python):
n = int(input())
A = list(map(int,input().split()))
ans = 0
for i in A:
    ans += 1 / i
print(1 / ans)

Solution (Python):
def main():
    _ = input()
    A = list(map(int, input().split()))
    d = 0
    for a in A:
        d += 1/a
    print(1/d)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
p = 0
for i in range(n):
    p += 1/a[i]
print(1/p)

Solution (Python):
N = int(input())


V = list(map(int,input().split()))

for i in range(N):
    V[i]=1/V[i]
print(1/sum(V))

Solution (Python):
from fractions import Fraction
n=int(input())
a=list(map(int, input().split()))
sum=0
for i in range(n):
   sum+=(1/a[i])
   
ans = 1/sum
print(ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
ans=0
for i in A:
    ans+=1/i
print(1/ans)

Solution (Python):
n = int(input())
list = list(map(int, input().split()))
sum = 0
            
for i in range(n):
  sum += (1/list[i])
  
ans = 1 / sum
print(ans)

Solution (Python):
n=int(input())
A=map(int,input().split())
tmp=0
for a in A:
    tmp+=1/a
print(tmp**(-1))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
sum = 0
for a in A:
    sum += 1/a
print(1/sum)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
r = 0
for i in range(N):
    r += 1 / A[i]
print(1/r)

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
r = 0
for i in range(N):
    r += 1 / A[i]
ans = 1 / r
print(ans)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(N): 
  ans += 1 / A[i]

print(1 / ans)

Solution (Python):
n = int(input())
a_lst = list(map(int,input().split()))
sum = 0
for i in range(n):
    a = a_lst[i]
    inv = 1 / a
    sum += inv
ans = 1 / sum
print(ans)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
bunbo=0
for i in range(n):
    bunbo+=1/a[i]
print(1/bunbo)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    ans += 1/a[i]
print(1/ans)

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce


import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n = I()
A = LI()

tmp = 0
for a in A:
    tmp += 1/a

print(1/tmp)

Solution (Python):
from fractions import Fraction
n = int(input())
a = list(map(int, input().split()))
b = 0
for i in range(0, n):
  b += Fraction(1, a[i])
print(float(1/b))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
B = [1/i for i in A]
print(1/sum(B))

Solution (Python):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
print(1/sum(1/A))

Solution (Python):
n = int(input())

x = list(map(int,input().split()))

t = 0

for i in x:
    t += 1/i
    
print(1/t)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

tmp = 1
for a in A:
    tmp *= a

ans = 0
for a in A:
    ans += tmp//a

print(tmp/ans)

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
for i in range(N):
    A[i]=1/A[i]
ans=1/sum(A)
print(ans)

Solution (Python):
N=int(input())
L=list(map(int,input().split()))
m=[]
for i in L:
  a=1/i
  m.append(a)
S=sum(m)
print(1/S)

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(N):
  ans += 1/A[i]

print(1/ans)

Solution (Python):
n = int(input())
a_list = [int(x) for x in input().split()]
print(1 / sum([1 / a for a in a_list]))

Solution (Python):


N = int(input())
A = [int(a) for a in input().split()]
dnm = 0
for a in A:
    dnm += 1 / a
print(1 / dnm)

Solution (Python):
_,*a=map(int,open(0).read().split());print(1/sum(1/x for x in a))

Solution (Python):
from math import factorial as fact
import math
import sys
import itertools
import numpy as np
from collections import Counter
import datetime



def input1():
	return int(input())


def input2():
	return map(int,input().split())


def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(range(n),r))



def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets


def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	
	return fact(x+y)/fact(x)/fact(y)


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
			


n=input1()
A=input_array()

print("{:.5f}".format(1/sum(1/x for x in A)))

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
inv = 0
for i in range(n):
    inv += 1 / A[i]
print(1 / inv)

Solution (Python):
N = int(input())
l = list(map(int, input().split()))
s = [1/l[i] for i in range(N)]
print(1/sum(s))

Solution (Python):
N=int(input())
A=list(map(int,input().split()))

import numpy as np

ones = np.ones(N)

total = np.sum(ones/A)

print(1/total)

Solution (Python):
import sys, heapq

N = int(input())
A = list(map(int, sys.stdin.readline().split()))

s = 0
for a in A:
    s += 1 / a

print(1/s)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))

sum=0
for i in range(n):
    sum+=1/a[i]
print(1/sum)

Solution (Python):
n=int(input())
an=list(map(int,input().split()))
arcan=[]
for i in an:
    arcan.append(1/i)
a=sum(arcan)
print(1/a)

Solution (Python):
n = int(input())
ar = list(map(int,input().split()))
ar_r = [1/i for i in ar]
print(1/sum(ar_r))

Solution (Python):
n=int(input())
an=list(map(int,input().split()))
print(1/sum([1/a for a in an]))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))

ans1 = 0
for a in A:
    ans1 += 1 / a
ans = 1 / ans1
print(ans)

Solution (Python):
def main():
    N = int(input())
    A = [int(x) for x in input().split()]
    denominator = 0
    for a in A:
        denominator += 1 / a
    ans = 1 / denominator
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):




import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    
    
    n=int(readline())
    arr=list(map(int, readline().rstrip().split()))
    x=0
    for a in arr:
        x+=1/a
    print(1/x)
    
    

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
ans = 0
for i in range(N):
    rev_i = 1/A[i]
    ans += rev_i
ans2 = 1 / ans
print(ans2)

Solution (Python):
input()
A=map(int,input().split())
print(1/sum(1/a for a in A))

Solution (Python):
n = int(input())
arr = list(map(int,input().split()))
num = 0
for i in arr:
    num += 1/i
print(1/num)

Solution (Python):
n = int(input())
a = list(1/int(i) for i in input().split())
print(1/sum(a))

Solution (Python):
n = int(input())
a = list(map(int,input().split()))

k = 0
for i in range(n):
    k += 1/a[i]

print(1/k)

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 6)





















N = int(input())
A = list(map(int,input().split()))
s = 0
for i in A:
    s += i**(-1)
print(s**(-1))

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
a = 0
for i in range(N):
  a = a + (1/A[i])
  
print(1/a)

Solution (Python):
N = int(input())
*A, = map(int, input().split())
sum = 0
for a in A:
    sum += 1 / a
print(1 / sum)

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))

sum = 0
for i in a_list:
    sum += 1/i

print(1/sum)

Solution (Python):
import numpy as np
import sys
import math

n=int(input())
A=np.array(list(map(int,input().split())))
print(1/sum(1/A))

Solution (Python):
N = int(input())
A = map(int, input().split())

A_inv = [1/i for i in A]
print(1/sum(A_inv))

Solution (Python):
N=int(input())
A=list(map(int,input().split()))
ans=0
for a in A:
  ans+=1/a
print(1/ans)

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
a_sum = 0
for i in a:
    a_sum += (1/i)
print(1/a_sum)

Solution (Python):
n=int(input())
a=list(map(int,input().split()))
ans=0
for i in a:
    ans+=(1/i)
print(1/ans)

Solution (Python):
import numpy as np
n = int(input())
a = np.array(list(map(int,input().split())))
print(1.0/sum(1.0/a))

Solution (Python):
N = int(input())
A = [int(i) for i in input().split()]

d = 0
for i in A:
    d += 1 / i

print(1 / d)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
sum = 0

for i in range(n):
    sum += 1/a[i]

print(1/sum)