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):
a = int(input())
n = list(map(int, input().split()))
b = []
for i in range(len(n)):
    b.append(1/n[i])
ans = 1/sum(b)
print(ans)

Solution (Python):
n = int(input())
a = [1/int(e) for e in input().split()]

print(1/sum(a))

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

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

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

print(1/M)

Solution (Python):
x=int(input())
a=[]
n=input().split(" ")
for i in range(0,x):
    a.append(int(n[i]))
s=1
for j in range(0,len(a)):
    s = s * a[j]
t=1
sum=0
for k in range(0,len(a)):
    t=s/a[k]
    sum=sum+t
print(s/sum)

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

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


def back(x):
    return 1 / x


l = list(map(back, int_list))
print(1/(reduce(add, l)))

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

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

inv_a = [1/i for i in a]
result = 1/sum(inv_a)

print(result)

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

Solution (Python):
def A():
    a = int(input())
    s = str(input())
    if a<3200:
        print('red')
    else:
        print(s)

def B():
    n = int(input())
    a = input().split()
    s = 0
    for i in range(n):
        s += (1/int(a[i]))
    print(1/s)

B()

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

x = [0]*n

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

print(1/sum(x))

Solution (Python):
from fractions import Fraction

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

b = 0
c = Fraction(0)

for i in range(n):
    b = Fraction(1, int(a[int(i)]))
    c = c + b

c = Fraction(c.denominator, c.numerator)


print(float(c))

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

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

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

i = 0
B = 0
while i <= N-1:
  B += 1/int(A[i])
  i += 1
  
print(1/B)

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

A = list()
A = numbers.split(" ")

sum1 = 0

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

sum2 = 1/sum1

print(sum2)

Solution (Python):



from fractions import gcd

def main():
    n = int(raw_input())
    l = map(int, raw_input().split())

    pr = 1
    for e in l:
        pr *= e

    denum = 0

    for e in l:
        denum += pr / e

    g = gcd(pr, denum)
    pr /= g
    denum /= g

    print 1.0 * pr / denum

if __name__ == "__main__":
    main()

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

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

x=1/y
print(x)

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

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

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

n = int(input())
a = list(map(int, input().split()))
mul_all = reduce(mul, a)
sum_all = 0
ans = 0
for i in range(n):
  sum_all += ( mul_all / a[i] )
ans = mul_all / sum_all

print(ans)

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

for i in range(len(a)):
    pans += (1 / a[i])
ans = 1 / pans
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):
a = int(input())
List=[int(i) for i in input().split()]
k = [1/i for i in List]
m = sum(k)
print(1/m)

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

ans = 1 / s
print(round(ans, 10))

Solution (Python):
import math
n = int(input())
result = float(0)
ni = [float(e) for e in input().split()]

for i in range(0,n):
	result = result + 1/ni[i]

print(1/result)

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

Solution (Python):
import numpy as np

N = int(input())
A = np.array(input().split(' '), float)

SUM=0
for i in range(N) :
    SUM += 1.0 / A[i] 

print(1/SUM)

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

Solution (Python):
value = [tuple(map(int,input().split())) for i in range(2)]
lis = []
new_v = 0

for i in range(value[0][0]):
    lis.append(value[1][i])

for i in range(len(lis)):
    i = 1 / lis[i]
    new_v += i

print(1 / new_v)

Solution (Python):
import numpy as np

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

print(np.reciprocal(np.sum(np.reciprocal(A))))

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

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

print(1/sum_reverse)

Solution (Python):
def main():
    n = int(input())
    data = list(map(int, input().split()))

    for k in data:
        if k == 0:
            return 0

    up = 1
    for i in range(n):
        up *= data[i]

    down = 0
    for j in range(n):
        down += up / data[j]

    return (up / down)

print(main())

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

Solution (Python):
import fractions


def main():
    _ = int(input())
    xs = [fractions.Fraction(int(a), 1) for a in input().split()]
    s = float(1 / sum(1 / x for x in xs))
    print("{:.12f}".format(s))


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
from fractions import Fraction

N = int(input())
A = [int(x) for x in input().split()]
tmp = []
for n in A:
    tmp.append(Fraction(1, n))

print(float(Fraction(1, sum(tmp))))

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

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

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

Solution (Python):
import fractions
import math
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd(), numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd(), numbers)

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

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


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

l=lcm_list(a)
s=[]
m=1
for i in a:
    li=l//i
    s.append(li)
su=sum(s)
ans=l/su
print('{:.9f}'.format(ans))

Solution (Python):
import numpy

N = int(input())
li = list(map(float, input().split()))

ans = sum(numpy.reciprocal(li))
print(numpy.reciprocal(ans))

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

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

Ans = 1 / bunbo
print(Ans)

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

Solution (Python):
input()
a=list(map(int, input().split()))
n=1
d=a[0]
for x in a[1:]:
    n=n*x+d
    d*=x
if d%n==0:
    print(int(d/n))
else:
    print(d/n)

Solution (Python):
import numpy as np

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

row2 = 1 / row1
print(1 / sum(row2))

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

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

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

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

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

s = 1.0 / s
print('{:.9f}'.format(s))

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

li1 = []

for i in a:
    a_re = 1/i
    li1.append(a_re)

sum_a = sum(li1)
print(1/sum_a)

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

def multi_all(A):
  s = 1
  for a in A:
    s *= a
  return s

M = multi_all(A)

if N == 1: print(A[0])
else:
  S = 0
  for a in A:
    S += M / a
  print(M/S)

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    A = list(map(int,input().split()))
    reverse_A = map(lambda x: 1/x, A)
    print(1/sum(reverse_A))

Solution (Python):
from fractions import gcd
from functools import reduce
N = int(input())
A = list(map(int, input().split()))


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

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

x = lcm_list(A)
y = 0
for a in A:
    y += x / a
if y == 0:
    print("NG!")
else:
    print(x / y)

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()))
print(1/sum([1/item for item in a]))

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

all_sum = 0

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

ans = 1 / all_sum

print(ans)

Solution (Python):
import fractions
import math

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

bunbo = 0

for i in A:
    bunbo += float(fractions.Fraction(1, i))

print(1/bunbo)

Solution (Python):
import fractions as fr
from functools import reduce

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

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

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

Solution (Python):
import sys


def main():
    n = int(sys.stdin.readline().strip())
    a = [int(s) for s in sys.stdin.readline().strip().split()]
    

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

    divider = 0
    for ai in a:
        divider += multi_all / ai

    print(multi_all / divider)


main()

Solution (Python):
N = input()
A = list(map(int, input().split()))
l = [1]*int(N)

array_multiple = list(map(lambda x,y: x/y, l, A))

print(1/(sum(array_multiple)))

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

Solution (Python):
n = input()
a = input().split()

a = map(lambda x: 1/int(x), a)
print(1/sum(a))

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

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

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

bunshi = 1
for i in a:
    bunshi *= i

bunbo = 0
for i in range(n):
    tmp = 1
    for j, x in enumerate(a):
        if j != i:
            tmp *= x
    bunbo += tmp

print(bunshi/bunbo)

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
a = na()
b = [1/i for i in a]
print(1/sum(b))

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

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

for j in list:
  
  gyaku += float(1/j)


print(1/gyaku)

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

Solution (Python):
from functools import reduce


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

g = reduce(lambda x, y: x * y, la, 1)


lp = list(map(lambda x: g / x, la))

p = sum(lp)

print(1/(p/g))

Solution (Python):
import operator
def prod(array):
        result = 1
        for i in range(len(array)):
                result *= array[i]
        return result
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 = [int(x) for x in input().split()]

d = 0
m = 1

for x in range(n):
    num = 1
    for y in range(n):
        if x != y:
            num *= a[y]

    d += num
    m *= a[x]

print(m / d);

Solution (Python):
import numpy as np

n = int(input())

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

ue = 1

for aa in a:
    ue *= aa

shita = 0

for aa in a:
    shita += ue / aa

print(ue / shita)

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

arr = list(map(int, input().strip().split()))

p = 1

for a in arr:
        p *= a

sum_ele = 0

for a in arr:
        sum_ele += (p//a)

res = p/sum_ele

print (res)

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

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

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

x = 0.0
for i in a:
  x += 1.0 / i

print(1.0/x)

Solution (Python):
def solve(n, a):
    prod = 1
    for a_i in a:
        prod *= a_i
    dev = 0
    for a_i in a:
        dev += prod / a_i
    return prod / dev
    

if __name__ == "__main__":
    n = int(input().strip())
    a = list(map(int, input().strip().split(" ")))

    print(solve(n, a))

Solution (Python):
from fractions import Fraction


def main():

    N = int(input())
    a = list(map(int,input().split()))
    aList = []
    
    for i in a:
        tmp = Fraction(1,i)
        aList.append(tmp)

    pre = sum(aList)
    print(pre.denominator/pre.numerator)



if __name__== "__main__":
    main()

Solution (Python):
import functools
import operator

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

frac = functools.reduce(operator.mul, a)
deno = 0
for i in range(n):
  deno += frac/a[i]
print(frac/deno)

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

print(1/total)

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

print(1/s)

Solution (Python):
import decimal




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



sum_reciprocal = 0

for i in range(len(a)):
    b = decimal.Decimal(1/a[i])
    sum_reciprocal += b

print(decimal.Decimal(1/sum_reciprocal))

Solution (Python):




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

print(1 / res)

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

print(1/count)

Solution (Python):
from fractions import Fraction
n = int(input())
L = list(map(int, input().split()))
anser = 0
for i in L:
    anser = anser + Fraction(1,i)
print(float(Fraction(1,anser)))

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

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

print(1 / ans)

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

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

print(1 / result)

Solution (Python):
from fractions import Fraction

n = int(input())
a = map(int, input().split())
ans = sum([Fraction(1, i) for i in a])

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math

n = getN()
nums = getList()

ans = 0
for num in nums:
    ans += 1/ num
    

print(1/ans)

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

Solution (Python):
from functools import reduce
import operator
 
n =int(input())
a = [int(x) for x in input().split()]
print(1/sum([1/x for x in a]))

Solution (Python):
import math 

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

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

print(float(1/ans))

Solution (Python):
from fractions import Fraction

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

for i in range(n):
  a_sum += Fraction(1,a[i])
  
print(float(Fraction(1,a_sum)))

Solution (Python):
n = int(input())
s = str(input())
a_s = s.split()
a_s = [float(str) for str in a_s]

ans = 0.0
idx = 0
while idx < n:
  ans += 1/a_s[idx]
  idx += 1

ans = 1/ans
print(ans)

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 sys

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
 
def gcd_list(li):
	if len(li) > 2:
		x = gcd(li[-1], li[-2])
		li = li[:-2] + [x]
		return gcd_list(li)
	else:
		return gcd(li[0], li[1])


def main():
    a = int(input())
    lists = list(map(int, input().split()))
    score = []

    if len(lists)==1:
        print(lists[0])
        sys.exit()

    bai = gcd_list(lists)

    for i in lists :
        num = bai / i
        score.append(num)

    bunbo = sum(score)

    ans = bai /bunbo
    print(ans)


if __name__ == '__main__' :
    main()

Solution (Python):
from fractions import Fraction
_=input()
L=input().split()
ans=0

def inverse(f):
    return Fraction(f.denominator,f.numerator)

for i in L:
	ans+=Fraction(1, int(i))
print(float(inverse(ans)))

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

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

Solution (Python):
from functools import reduce

n = int(input())
a = [int(s) for s in input().split()]
s = reduce(lambda x, y: x * y, a)
d = sum(s / x for x in a)
print('%.6f' % (s / d))

Solution (Python):
from fractions import Fraction
def inverse(A):
    return 1/A
N = int(input())
A = list(int(i) for i in input().split())
ans = 0
for i in range(N):
    ans += inverse(A[i])
print(1/ans)

Solution (Python):
def reciprocal(a):
    return 1 / a

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

print(1 / sum)

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

sumGayku = 0
for a in A:
    sumGayku += 1.0/a

print(1/sumGayku)

Solution (Python):

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

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

print(1/total)

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):
def inpl(): return list(map(int, input().split()))

N = int(input())
print(1/sum([1/v for v in inpl()]))

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

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

newList = []

for i in A:
    newList.append(1 / i)

count = sum(newList)

print(1 / count)

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

total = 0

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

print(1/total)

Solution (Python):
n = int(input())
num_list = list(map(int, input().split()))
def ave(nums):
    rev_sum = 0
    for i in nums:
        rev_sum += 1/i
    ans = 1/rev_sum
    return ans

print(ave(num_list))

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

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 = list(map(int, input().split()))
reversed_a = []
for i in a:
    reversed_a.append(1 / i)
print(1 / sum(reversed_a))

Solution (Python):
import numpy as np

n = int(input())

arr = list(map(float, input().split(" ")))

ans = 0.
for i in range(n):
    ans += np.reciprocal(arr[i])

print(1/ans)

Solution (Python):
while True:
    try:
        N = int(input())
        A = map(int, input().split())
        print(1/sum(map(lambda x: 1/x, A)))
    except EOFError:
        break

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

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

print(float(d/m))

Solution (Python):

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



prod = 1
for i in range(n):
    prod *= a[i]
lst = []
la = lst.append
for i in range(n):
    la(prod/a[i])
ans = prod/sum(lst)
print(ans)

Solution (Python):
import numpy as np


def main():
    _ = int(input())
    A = list(map(int, input().split()))
    arr = np.array(A)
    a = 1 / arr
    s = sum(a)

    print(1 / s)

    return


if __name__ == "__main__":
    main()

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

for i in a:
    gyaku += 1/i

ans = 1/gyaku
print(ans)

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 = input()
N = int(N)

A = []
A = input().split()

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

print(1/sum)

Solution (Python):
n = int(input())
a = list(map(int,input().split()))
a_reverse = [0] * n
bunbo = 0
answer = 0

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

answer = 1 / bunbo
print(answer)

Solution (Python):


N = int(input())
A = list(map(lambda x: 1/int(x), input().split()))
A.sort()
sum = 0
for n in A:
    sum += n

print(1/sum)

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

print(res)

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

b = sum(np.reciprocal(a))

print(np.reciprocal(b))

Solution (Python):
n = int(input())
a = input().split()
child = 1
mother = 0
for i in range(n):
	child *= int(a[i])
for j in range(n):
	mother += child / int(a[j])
print(child / mother)

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):
a = int(input())

bb = input()
b = []
for i in bb.split(' '):
    b.append(int(i))

c = 1
for i in b:
    c = c * i

m = 0
for i in b:
    m = m + c / i

print(c / m)

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

denominator = int()

for i in A:
	denominator += 1/i

print(1/denominator)

Solution (Python):
result = 0
N = int(input())
array=[int(x) for x in input().split()]

for i in range(len(array)):
    
    
    result += 1/array[i]
    

print(1/result)

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

Solution (Python):
N = int(input())
A = list(map(int, input().split()))
a_max = max(A)
c = []
for x in range(N):
  if A[x] < a_max:
    c.append(a_max / A[x])
  else:
    c.append(1)
print(a_max / sum(c))

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

ans = 0.0
for a in alist:
    ans += 1 / a
ans = 1 / ans

print(ans)

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

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

Solution (Python):
a = int(input())
b = list(map(int,input().split()))
c = 0

for i in b:
  c += 1 / i

print(1 / c)

Solution (Python):
from fractions import Fraction


def inverse(f):
    return Fraction(f.denominator, f.numerator)


N = int(input())
A = list(map(int, input().split()))
ans = []
reverse = []

for i in A:
    ans.append(Fraction(1, i))
    reverse.append(Fraction(i, 1))

print(float(inverse(sum(ans))))

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

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

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

tmp = 0

for i in li:
  tmp += (1/i)

print(1/tmp)

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

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

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

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

print(1/denominator)

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

top = 1
under = 0
for i in range(N):
    top = top * int(A[i])
    
for i in range(N):
    under = under + (top / int(A[i]))

result = top / under
print(result)

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

for i in range(N):
    A1 *= A[i]
sum = 0
for i in A:
    sum += A1 / i

print(A1/sum)

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")


def main():
    N = int(input())
    A_1 = list(map(int, input().split()))
    logging.info("Hello!")

    sum = 0
    for i in A_1:
        sum += (1 / i)


    print(1 / sum)
    
    
    
if __name__ == "__main__":
    main()

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

ans = 0.0

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

ans = 1/sum(A)

print(ans)

Solution (Python):

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

Solution (Python):
n = int(input())
sums = 0
for num in input().split():
  sums += 1/int(num)
print(1/sums)

Solution (Python):
from fractions import Fraction
N = int(input())
A = list(map(int, input().split(' ')))
sum = 0
tmp=0
for i in A:
    sum += Fraction(1,i)
print(float(Fraction(1,sum)))

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

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

nums_inv = [1 / x for x in nums]
print(1 / sum(nums_inv))

Solution (Python):
from fractions import Fraction
from sys import stdin

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

    n = 0
    for i in A:
        n += Fraction(1, i)
    print(n.denominator / n.numerator)

input = lambda: stdin.readline()
main()

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

sum = 0

for num in nums:
  sum += 1 / num

print(1 / sum)

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

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

Solution (Python):
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
N = int(input())
a = list(map(int, input().split()))

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

print(Decimal(1/res))

Solution (Python):
import sys
a = []
for l in sys.stdin:
    a.append(l)

a_array = a[1].split(' ')
a_array

sum = 0

for i in a_array:
    sum += (1 / int(i))

print(1 / sum)

Solution (Python):
N=int(input())
A=list(map(int, input().split()))
B=[0]*N

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

sumB=sum(B)
print(1/sumB)

Solution (Python):
n=input()
alist= [int(x) for x in input().split()]
prod=1
for a in alist:
    prod*=a
s=0
for a in alist:
    s+=prod//a
print(prod/s)

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

import fractions as frc
from functools import reduce

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

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

x=lcm_list(s)
tot=0

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

Solution (Python):
import functools
import operator

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

prod = functools.partial(functools.reduce, operator.mul)
p = prod(A)
p_list = sum(p // a for a in A)

print(p / p_list)

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


reciprocal_total = sum([(1.0 / n) for n in nums])
ans = 1.0 / reciprocal_total
print(ans)

Solution (Python):
if __name__ == "__main__":
    
    N = int(input())
    A = list(map(int, input().split()))
    bunbo = 0
    for i in range(N):
        bunbo += float(1/A[i])
    print(float(1/bunbo))

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

Solution (Python):
import numpy as np
N = int(input())
A = list(map(int, input().split()))
for i in range(len(A)):
    A[i] = 1/ A[i]

a = sum(A)
print(1/a)

Solution (Python):
from fractions import Fraction

N = int(input())
l = list(map(int, input().split()))
under = 0

for i in range(N):
  under += Fraction(1, l[i])

result = float(Fraction(1, under))

print(result)

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

ans = int(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 i in a:
  if i == 0:
    continue
  ans += (1 / i)

print(1 / ans)

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

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

max = 0
sum = 0

for i in range(n):
  a = int(A[i])
  if a > max:
    max = a

for i in range(n):
  sum += max/int(A[i])

print(max/sum)

Solution (Python):
N = int(input())
li = list(map(int,input().split()))
bo = 0
shi = 1
for i in range (N):
    shi *= li[i]
for i in range(N):
    k = 1
    m = 1
    for j in range(i):
        k *= li[j]
    for n in range(i+1,N):
        m *= li[n]
    bo += k*m
print('{:.10g}'.format(shi/bo))

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

ans = 0

for i in a:
    ans += (1./i)

print(1./ans)