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):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()
tmp = 0

for a in A:
	tmp += 1/a

print(1/tmp)

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):
import numpy as np
N = int(input())
A = [int(x) for x in input().split()]
count = 0
num = np.array(A)
print(1/sum(1/num))

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

ans = 0

for i in ai:
    ans += 1/i

print(1/ans)

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

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

Solution (Python):

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

Solution (Python):

import numpy as np
n=int(input())
a=list(map(float,input().split()))
a_array=np.array(a)
a_inv=np.reciprocal(a_array)
print(float(1/sum(a_inv)))

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

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

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())
li = list(map(int,input().split()))	
cnt = float(0)
for i in range(n):
    cnt += float(1 / li[i])
print(1 /cnt)

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

C=A**-1

print((C.sum())**-1)

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

Solution (Python):
n=int(input())
A=map(int,input().split())
B=[]
for i in A:
  B.append(i**(-1))
print(sum(B)**(-1))

Solution (Python):


def main():
    *N, = map(int, open(0).read().split())
    A = N[1:]
    N = N[0]

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


main()

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

souwa = sum([1/i for i in a])
print(1/souwa)

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

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

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

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


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

div_hoge = list(map(lambda x: 1/x,hoge))
ans = 1/sum(div_hoge)
print(ans)

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()))
a=0
for i in range(N):
    a+=1/A[i]
print(1/a)

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

Solution (Python):
n = int(input())
li = list(map(int, input().split()))
s = 0
for i in li:
  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()))
res = []
for a in A:
  res.append(1 / a)
print(1 / sum(res))

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

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

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

Solution (Python):


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

ans = 0
for i in range(n):
    ans += pow(a[i], -1)

print(pow(ans, -1))

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 math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 

n = int(input())
a = list(map(int, input().split()))
ans = 0.0
for x in a:
    ans += 1.0 / x
print(1.0 / ans)

Solution (Python):
n = int(input())
s = input().split()
a = 0
c = 0
while a < n:
  c += 1/(int(s[a]))
  a += 1
print(1/c)

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):
def main():
	n = int(input())
	arr = list(map(int,input().split()))
	add = 0
	for x in arr:
		add+=(1/x)
	print(1/add)




main()

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()))

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

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

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

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

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

ans = 0

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

print(1/ans)

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

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

Solution (Python):
n = int(input())
A = list(map(int, input().split()))
ans = 0
for x in A:
    ans += 1/x
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):
def resolve():
    n=int(input())
    l=list(map(int, input().split()))
    print(1/sum(1/l[i] for i in range(n)))
resolve()

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

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):

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

mom = 0
for i in range(len(a)):
    mom += 1/a[i]

print(1/mom)

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

Solution (Python):
n = int(input())
lst = []
s = input().rstrip().split(' ')
for j in range(n):
  lst.append(int(s[j]))
temp = 0
for i in range(n):
  temp += 1 / lst[i]
ans = 1 / temp
print(ans)

Solution (Python):

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


Numerator=1
for i in range(N):
    Numerator *=A[i]

Denominator =0
for i in range(N):
    Denominator +=Numerator/A[i]

ans =Numerator/Denominator
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=list(map(int,input().split()))

for i in range(len(A)):
    A[i]=1/A[i]

print(1/sum(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):
n = int(input())
a_list = [int(x) for x in input().split()]

temp = 0
for a in a_list:
    temp += 1 / a
ans = 1 / temp
print(ans)

Solution (Python):
from functools import reduce
from operator import mul

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

temp_mul = reduce(mul, a_list)

temp_add = 0
for a in a_list:
    temp_add += temp_mul // a

ans = temp_mul / temp_add
print(ans)

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

sum=0
for i in range(len(S)):
  sum=sum+1/S[i]
  
  
sumsum=1/sum

print(sumsum)

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

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

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

Solution (Python):
n,*a=map(int,open(0).read().split())
ans=0
for i in range(n):
  a[i]=1/a[i]
print(1/sum(a))

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

Solution (Python):

N = int(input())
A = [int(s) for s in input().split()]

denominator = 0

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

print(1 / denominator)

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()))

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

print(ans)

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

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())
h = list(map(int,input().split()))
ans = 0
for i in range(n):
    ans += 1/h[i]
print(1/ans)

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

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

sm=0

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

print(1/sm)

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

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

gyaku = 0
for i in range(len(a)):
    gyaku =gyaku +  1 / a[i]

print(1 / gyaku)

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

Solution (Python):
n = int(input())
aa = list(map(int, input().split()))
s = 0.0
for a in aa:
    s += 1 / a
print(1 / s)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()
a = []

for i in range(N):
  a.append(1/A[i])

print(1/sum(a))

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

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):
N=int(input())
A=[1/int(x) for x in input().rstrip().split()]
print(1/sum(A))

Solution (Python):
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    print(1.0/sum(map(lambda x : 1/x, A)))
main()

Solution (Python):
N = input()
A = list(map(int,input().split()))
A_re = list(map(lambda x : 1/x , A))
ans = 1/sum(A_re)
print(ans)

Solution (Python):
import fractions
total = 0
A = int(input())
listB = list(map(int,input().split()))
if 1 < A:
    B = listB[0] * listB[1] // fractions.gcd(listB[0],listB[1])
    for i in range(A-2):
        B = listB[i+2] * B // fractions.gcd(B,listB[i+2])
else:
    B = listB[0]
for i in listB:
    total += B // i
print(B / total)

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

Solution (Python):
import numpy as np
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  N = int(readline())
  A = np.array(readline().split(), np.float128)
  B = 1 / A
  C = B.sum()
  print(1/C)
  
  
if __name__ == '__main__':
  main()

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop
import numpy as np

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N, A, B = map(int, input().split())
D = [int(input()) for _ in range(N)]
"""
N = int(input())
A = np.array(input().split(), dtype=np.float64)
print(1 / sum(1 / A))

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop
import numpy as np

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N, A, B = map(int, input().split())
D = [int(input()) for _ in range(N)]
"""
N = int(input())
A = list(map(int, input().split()))

arr = np.array(A)
arr = 1 / arr
print(1 / sum(arr))

Solution (Python):
N = int(input())
a = list(map(int, input().split()))
sum_a = 0

for i in a:
    sum_a += i ** -1

print(sum_a ** -1)

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()))

for a in range(N):
    A[a] = 1 / A[a]

sm = sum(A)

print(1/sm)

Solution (Python):
import math

def main():
    n = int(input())
    a_l = list(map(int, input().split()))
    frac = 0
    for a in a_l:
        frac += (1 / a)
    print(1/frac)
if __name__ == "__main__":
    main()

Solution (Python):
x=int(input())
s=0
line=list(map(int,input().split()))
for i in line:
    s=s+(1.00/i)
s=1.00/s
print(s)

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

k = 0

for i in range(n):
  k += a[i]**(-1)
print(k**(-1))

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

print(1/i)

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()))
REV =  [ 1/i for i in A]
REV_SUM = sum(REV)
print(1/REV_SUM)

Solution (Python):
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)

Solution (Python):
def gyaku(n):
  return 1 / n
N = int(input())
A = list(map(int,input().split()))
A2 = list(map(gyaku,A))
x = sum(A2)
print(str(1 / x))

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

Solution (Python):
n = int(input())
a = map(int, input().split())
print(1.0 / sum(1.0 / a for a in 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):
n = int(input())
a = list(map(int, input().split()))

den = 1
num = 0
for i in range(n):
    b = 1
    for j in range(1, n):
        b *= a[(i + j) % n]
    den *= a[i]
    num += b

print(den / num)

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

ret = 1
for a in A:
    ret *= a
ret2 = sum([ret // a for a in A])
print(ret / ret2)

Solution (Python):
import os, sys, re, math
from fractions import Fraction

N = int(input())
A = [int(n) for n in input().split()]

s = sum([Fraction(1, a) for a in A])
s = Fraction(s.denominator, s.numerator)

print(float(s))

Solution (Python):

N = int(input())
A = [int(s) for s in input().split()]

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

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

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

Solution (Python):
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)

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

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

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

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

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

print(1/res)

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

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

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

print(1/res)

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

print(float(Fraction(1,ans)))

Solution (Python):
from math import fsum
N = int(input())
A = list(map(int, input().split()))
ans = 1 / fsum([1 / a for a in A])
print(ans)

Solution (Python):
import numpy
def Resistors(n , al):

    ans = 0
    count = 0

    for i in range(n):
        count += 1/al[i]

    return numpy.reciprocal(count)

def main():
    n = int(input())
    al = list(map(int , input().split()))
    print(Resistors(n , al))

if __name__ == '__main__':
    main()

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

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):
import io

nim = int(input())
mike = list(map(int, input().split()))
    
zen = 0
for i in range(nim):
    zen += 1/mike[i]
    
print(1/zen)

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

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

ans = 1 / bunbo

print(ans)

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()))
x = 0

for i in range(n):
    x += 1/A[i]
print(1/x)

Solution (Python):
"""
int(input())
map(int,input().split())
list(map(int,input().split()))

"""

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):
import sys
input = lambda: sys.stdin.readline().rstrip() 

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

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

if __name__ == '__main__':
    resolve()

Solution (Python):
import sys


def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))


n=II()
A=LI()
x=0
for i in range(n):
    x+=1/A[i]
x=1/x
print(x)

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

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

print(1/anc1)

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

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

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

sum = 0

for a in A:
    sum += 1.0 / a
    
print(1.0 / sum)

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

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

Solution (Python):
n=int(input())
A=[int(_) for _ in input().split()]
print('{:.16g}'.format(1/sum(1/x for x in A)))

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

Solution (Python):

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

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

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

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

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

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

Solution (Python):
n = int(input())
d = list(map(float, input().split()))
ans = 0

for i in range(n):
    ans += (1/d[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()))
answer = A[0]
for i in range(1,N):
    answer = 1 / (1/answer + 1/A[i])
print(answer)

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

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

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

print(1/sum)

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

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

Solution (Python):
def q2():
    N = int(input())
    A = [int(i) for i in input().split()]
    ans = sum(map(lambda x: 1/x, A))
    print('{0:.5f}'.format(1/ans))


if __name__ == '__main__':
    q2()

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

import fractions


ans = a[0]
for i in range(1, N):
    ans = ans * a[i] // fractions.gcd(ans, a[i])


res = ans
denominator = 0

for i in range(N):
    denominator += ans/a[i]

print(res/denominator)

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

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

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

Solution (Python):
import numpy as np

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

def calc(A):
  return 1/sum(1/A)
  
ans = calc(A)
print(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()))
v = 1
for i in a:
  v *= i
s = 0
for i in a:
  s += v//i
print(v/s)

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

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

new = 1/old
print(new)

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

Solution (Python):
n, *a = map(int, open(0).read().split())

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

down = 0
for i in range(n):
    cnt = 1
    for j in range(n):
        if j != i:
            cnt *= a[j]
    
    down += cnt
    
print(up / down)

Solution (Python):
import sys
stdin=sys.stdin

ns=lambda:input().rstrip()
ni=lambda:int(input().rstrip())
nm=lambda:map(int,input().split())
nl=lambda:list(map(int,input().split()))

N=int(input())
A=nl()
A_inv=[1/A[i] for i in range(len(A))]
print(1/sum(A_inv))

Solution (Python):
N = int(input())
A = list(map(lambda x: 1/int(x), input().split()))
print(1/sum(A))

Solution (Python):
N = int(input())
A = [ int(_) for _ in input().split()]
S = 0
for i in range(N):
    S += 1 / A[i]
print(1/S)

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

Solution (Python):
n = int(input())
a = [1/int(i) for i in input().split()]
print('{:.7f}'.format(1/sum(a)))

Solution (Python):
from functools import reduce

N = int(input())
A = input()
A = map(lambda Ai: int(Ai), A.split())

sum = lambda list: reduce(lambda x, y: x + y, list, 0)
reciprocal = lambda value: 1 / value

reciprocal_A = map(reciprocal, A)
sum_reciprocal_A = sum(reciprocal_A)
answer = reciprocal(sum_reciprocal_A)

print(answer)

Solution (Python):
N,*A,=map(int,open(0).read().split());print(1/sum([1/i for i in A]))

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

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

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

Solution (Python):
a = int(input())
b = input().split()
sum_all = 0
for i in range(a):
    sum_all += 1/int(b[i])
print(1/sum_all)

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

print('{:.6f}'.format(1/ans))

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

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

print(1/ans)

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  n = int(input())
  A = list(map(int,input().split()))
  
  ans = 0
  for i in range(n):
    ans += 1/A[i]
  inv = 1/ans
  print(inv)
if __name__ == '__main__':
  main()

Solution (Python):
int(input())
print(1 / sum(1/int(num) for num in input().split()))

Solution (Python):


import sys














def main():
    mod = 10000007                  
    inf = float('inf')
    input = sys.stdin.readline      
    sys.setrecursionlimit(10**6)    
    def ii():  return int(input())
    def mi():  return map(int, input().rstrip().split())
    def lmi(): return list(map(int, input().rstrip().split()))
    def li():  return list(input().rstrip())
    
    
    n = ii()
    a = lmi()
    print(1 / sum(list(map(lambda x: 1/x, a))))

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
list_A = list(map(int, input().split()))
a = 1

mul_A = 1

for i in range(N):
    a = list_A[i]
    mul_A = mul_A * a
    
sum_A = 0

for i in range(N):
    a = mul_A // list_A[i]
    sum_A = sum_A + a
    
print(mul_A/sum_A)

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

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

Solution (Python):
input()
print(1 / sum(1 / int(num) for num in input().split()))

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

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


ans=0

for i in range(n):
    ans+=1.0/al[i]

ans=1.0/ans

print('{:.9f}'.format(ans))

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

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

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = int(input())
    b = [int(i) for i in input().split()]

    count =Decimal(0)

    for i in b:
        count = count +(Decimal(1) / Decimal(i))

    print(Decimal(1) / Decimal(count))

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())

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



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

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

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

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