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

Solution (Python):


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

    print('{:.6f}'.format(1/sum(1/a for a in A)))
    

if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np
import sys

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

    rev = 0
    for num in a:
        rev += 1/num
    
    print(1/rev)
        


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
n=int(input())
al=list(map(int,input().split()))
ald=[]
def cal(n):
    return 1/n
for i in al:
    ald.append(cal(i))
aldsum=sum(ald)
ans=1/aldsum
print(ans)

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

_sum = 0
for i in range(N):
    _sum += 1 / AA[i]

print(round(1/_sum, 10))

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

result = 0
for num in aryNum:
    result += 1 / num

print(1/result)

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

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    token = lines[0].split(" ")
    n = int(token[0])

    a = [int(e) for e in lines[1].split(" ")]

    return (n, a)


def solve(n, a):

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

    result = 1 / total

    return result


def main():
    

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

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

Solution (Python):

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

ans = 1/B
print(ans)

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

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

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

Solution (Python):
from decimal import *

n = int(raw_input())
a = map(int, raw_input().split())

den = Decimal(0)

for i in xrange(n):
	den += Decimal(1)/Decimal(a[i])

ans = Decimal(1)/den

print ans

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

a = list(map(lambda x: 1 / x, A))
total = sum(a)
print(1 / total)

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

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

Solution (Python):
from fractions import Fraction

N = int(input())
A = map(int, input().split())
s = sum([Fraction(1, x) for x in A])
print(float(Fraction(s.denominator, s.numerator)))

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

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

devider = 0

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

ans = 1 / devider

print(ans)

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 = int(input())
a = list(map(int, input().split()))
ans = []

for i in range(n):
    r = 1/a[i]
    ans.append(r)

ans2 = 1/sum(ans)
print(ans2)

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

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

    prod = 1
    for i in A: prod *= i
    frac = []
    for i in A:
        frac.append(prod // i)
    denom = sum(frac)
    return prod / denom

if __name__ == '__main__':
    print(main())

Solution (Python):


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

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

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

z = 0

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

print(1/z)

Solution (Python):
import numpy as np

N = int(input())
A = np.fromstring(input(), sep=' ')
ans = 1 / (1. / A).sum()
print(ans)

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

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

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

Solution (Python):


def main():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for a in A:
        ans += 1/a
    return 1/ans

if __name__ == '__main__':
    print(main())

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

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

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

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

print(1/s)

Solution (Python):
n = int(input())
a_list = list(map(int, input().split()))
multi = a_list[0]
for num in a_list[1:]:
    multi *= num

total = 0
for num in a_list:
    total += multi // num

print(multi/total)

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

gyakusuu_wa = 0

for i in range(N):
  gyakusuu_wa += 1/An[i]

answer = 1 / gyakusuu_wa

print(answer)

Solution (Python):


from functools import reduce


def main():
    
    n = int(input())
    a = map(int, input().split())
    print(process(n, a))


def process(n, a):
    a = map((lambda x: 1 / x), a)
    asum = reduce((lambda x, y: x + y), a)
    return 1 / asum


if __name__ == "__main__":
    main()

Solution (Python):

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

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

print(1/tmp)

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

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

seki = 1

for i in range(n):
  seki  = seki * array[i]
  
wa = 0
for i in range(n):
  wa += seki/array[i]
  
  
print(seki/wa)

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

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

count = 0
for i in range(N):
  count += 1 / lis[i]

print(1 / count)

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

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

gcd = 1
for i in A:
        gcd *= i

tmp = []
for j in A:
        tmp.append(gcd/j)

print(gcd/sum(tmp))

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())
L = list(map(int, input().split()))
ans = 0
for x in L:
    ans += 1 / x

print(1 / ans)

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

B=[]
for a in A:
  b = 1/a
  B.append(b)
print(1/sum(B))

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

below = 0
for a in aa:
  below += 1/a
 
print(1/below)

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())
arr=list(map(int,input().split()))
sum1=1
for val in arr:
  sum1*=val
sum2=0
for i in range(n):
  tmp=1
  for j in range(n):
    if i==j:
      continue
    tmp*=arr[j]
  sum2+=tmp
print(sum1/sum2)

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())
num_list = input().split()
ans = 0
for i in num_list:
  x = 1/int(i)
  ans = ans + x

print(1/ans)

Solution (Python):
N=int(input())
A=list(map(int,input().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+= float(1/A[i])
ans = float(1/sum)
print(ans)

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

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

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

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

b = 0
for i in an:
    b += 1/i
print(1/b)

Solution (Python):
import sys

def solve(N: int, A: "List[int]"):
    result = 0.
    for i in range(N):
        result += 1./A[i]
    print(1./result)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = [ int(next(tokens)) for _ in range(N) ]  
    solve(N, A)

if __name__ == '__main__':
    main()

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

A = list(map(int,input().split()))
         
s = sum([1/i for i in A])

print(1/s)

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()))
from decimal import Decimal
a = list(map(Decimal,a))

b = [1/i for i in a]
print('{:.6f}'.format(1/sum(b)))

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

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

Solution (Python):
n = int(input())
array = [int(i) for i in input().split()]
seki = 1
for i in range(n):
  seki  = seki * array[i]  
wa = 0
for i in range(n):
  wa += seki/array[i]
print(seki/wa)

Solution (Python):
import numpy as np

N = input()
N = int(N)
stN = str(N)
p = input().split()
p_l = [int(s) for s in p]

pn = np.array(p_l)
ones = np.ones(len(p_l))
gyaku = ones/pn
ans = sum(gyaku)
ans = 1/ans
print(ans)

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

sum = 0
for i in range(N):
	sum += 1.0 / float(Alis[i])
print(1.0/sum)

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

n = readi()
t = readl()

s = 0
for i in t:
    s += 1 / i

print(1 / s)

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

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

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

ssum = 0
for s in ss:
    ssum += 1 / s
print(1 / ssum)

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())
Alist = map(int,input().split())
wa = 0
for A in Alist:
    wa += 1/A
print(1/wa)

Solution (Python):

def solve():
    N = int(raw_input())
    A = [int(_) for _ in raw_input().split()]
    revSum = 0.0
    for i in range(N):
        revSum += 1.0 / A[i]
    print 1.0 / revSum

if __name__ == '__main__':
    solve()

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

for i in a:
    result += 1./i

print(1/result)

Solution (Python):
import math;

def swap(a,b):
    return (b,a)

def gcd(a,b):
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

xm = [1,0,-1,0]
ym = [0,1,0,-1]

def bfs(y,x):
    if (y==gy and x==gx):
        return
    for i in range(4):
        for j in range(4):
            if (c[y+ym[i]][x+xm[j]]=='
                continue
            if (aom[y+ym[i]][x+xm[j]]!=-1):
                continue
            aom[y+ym[i]][x+xm[j]] = aom[y][x] + 1

def main():
    n = int(input())
    a = [x for x in map(int,input().split())]
    x = 0
    for i in a:
        x += 1 / i
    ans = 1 / x
    print(ans)
    return

if __name__ == '__main__':
    main()

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

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

l = list(map(int, input().split()))
print(max(l)/sum([max(l)/i for i in l]))

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

print(1/ans)

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

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

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

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

print(1/ans)

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

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

below = 0
for i in range(N):
    below += 1 / A_array[i]

print(1/below)

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

Solution (Python):

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

M = []
prod = 1
for a in A:
    prod *= a

for a in A:
    M.append(prod / a)

ans = prod / sum(M)
print(ans)

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

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

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

print(1 / inv)

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

print(1/ss)

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


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

Y = []

for i in range(n):
    tmp = 1
    for j in range(n):
        if(i!=j):
            tmp = a[j] * tmp
    Y.append(tmp)

sum_y = 0
for i in Y:
    sum_y = sum_y + i

print(x/sum_y)

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

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

print(str(1/sum_num))

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

print(1/x)

Solution (Python):
N=int(input())
AN=[1/int(x) for x in input().split()]

print(1/sum(AN))

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

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

print(1/ans)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    result = 1 / sum([1.0 / int(i) for i in input().split()])
    print(result)


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input())
    xs = input().split()
    prod = 1
    for i in range(N):
        prod *= int(xs[i])
    sum = 0
    for i in range(N):
        sum += prod / int(xs[i])
    print(prod / sum)
    return


if __name__ == "__main__":
    main()

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

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

Solution (Python):
n = int(input())
a = list(map(float, input().split()))
s = sum(map(lambda e: 1.0 / e, a))
print(1.0 / s)

Solution (Python):
import sys,heapq,math,resource
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

def setrlim():
  sys.setrecursionlimit(250000)
  soft,hard = resource.getrlimit(RLIMIT_STACK)
  
  

n = inn()
a= inl()
sum = 0.0
for i in range(n):
    sum += 1.0/a[i]
print(1/sum)

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

Solution (Python):


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

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

print(1/ans)

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

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

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

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

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

print(1 / inv_sum)

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

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())
*a, = map(int,input().split())

sum=0
for num in a:
    sum+=1/num

print(1/sum)

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

sum = 0.0
for a in arr:
    sum += (1/a)
ans = 1.0 / sum
print(ans)

Solution (Python):
import fractions
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(*A)


ans = 0.0
for i in range(N):
    ans += float(l) / float(A[i])

ans = l/ans
if ans%1 == 0:
    ans = int(ans)

print(ans)

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

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

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

array = list(map(int, input().strip().split(' ')))
x = 0
for i in range(n):
    x = x + (1/array[i])
ans = 1/x

print(ans)

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 = list(map(int, input().split()))
B = []
for i in range(N):
  B.append(1/A[i])
C = sum(B)

print(1/C)

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

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

Solution (Python):
N=int(input())
A=input().split()
for i in range(N):
    A[i]=1/int(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(map(int,input().split()))
suma=0
for a in A:
  suma+=1/a
print(1/suma)

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

print(1.0/ans)

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

s = 0

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

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

print(1/sum(n_list))

Solution (Python):
N = int(input())
A = list(map(int,input().split()))
mul_A = 1
for a in A:
    mul_A *= a


parts_mul_A = list(map(lambda x: int(mul_A/x),A))

ans = mul_A/sum(parts_mul_A)
print(ans)

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

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

sm = 0
for i in a:
	sm += 1.0/i

sm = 1.0/sm

print(sm)

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

Solution (Python):
N = int(input())
*A, = map(int, input().split())
s = 1
for i in range(N):
    s *= A[i]
t = 0
for i in range(N):
    t += s // A[i]
print("%.16f" % (s/t))

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 = list(map(lambda x:int(x),input().split(" ")))
inv_a = 0

for i in range(N):
  inv_a += 1/a_list[i]

print(1/inv_a)

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

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

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

    denominator = 0

    for i in a:
        denominator += 1 / i
    
    print(1 / denominator)

if __name__ == '__main__':
    abc138_b()

Solution (Python):
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.00000
for i in range(N):
    sum1 += 1/A[i]
print(1/sum1)

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

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip

from functools import reduce


def gcd(x, y):
    """greatest common divisor of x and y"""
    while y:
        x, y = y, x % y
    return x


def extended_gcd(a, b):
    """returns gcd(a, b), s, r s.t. a * s + b * r == gcd(a, b)"""
    s, old_s = 0, 1
    r, old_r = b, a
    while r:
        q = old_r // r
        old_r, r = r, old_r - q * r
        old_s, s = s, old_s - q * s
    return old_r, old_s, (old_r - old_s * a) // b if b else 0


gcdm = lambda *args: reduce(gcd, args, 0)

lcm = lambda a, b: a * b // gcd(a, b)

lcmm = lambda *args: reduce(lcm, args, 1)


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

    l = lcmm(*a)

    print(l / sum(l // i for i in a))




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):

import sys;
import string;
sys.setrecursionlimit(20000) 

import copy
import math
import itertools

from functools import lru_cache


PPP = 1000000007


n = int(input())









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





























import re
import fractions

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

def ton(n, k, x):
  s = ""
  while n > 0:
    s = str(n%k) + s
    n //= k
  return s





def getEnergy():
  for y in b:
    yield y

  
  return res

def doit():
  ret = 0.0
  for x in a:
    ret += 1.0 / x
  return 1.0 / ret

def yn():
  if doit():
    return "YES"
  else:
    return "NO"




try:
  
  print(doit())
  
except Exception as e:
  print("e", e, file=sys.stderr)

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

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

print(1 / tmp)

Solution (Python):
n=int(input())
lista=map(int,input().split())
b=sum(1/i for i in lista)
print(1/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):
N = int(input())
A = list(map(int, input().split()))
list1 = [1/x for x in A]
sum1 = sum(list1)
ans = 1/sum1
print(ans)

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

Solution (Python):
number = int(input())
input_a_list = list(map(int, input().split()))
tmp_sum = 0

for a in input_a_list:
    tmp_sum += 1/a

print(1/tmp_sum)

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

print(1/tmp)

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

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

Solution (Python):
import numpy as np
N = int(input())
A = np.array([float(v) for v in input().split()])

print(1.0 / sum(1.0 / 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())
l = list(map(int,input().split()))
xx = 0
for x in l:
	xx += 1/x
print(1/xx)

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

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

print("{}".format(res))

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

result = 0.0
nums = input().split()

for num in range(a):
  result += 1/ int(nums[num])

print(1/result)

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

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

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

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_list = np.array(list(map(int,input().split())))
a_list = 1/a_list
print(1/sum(a_list))

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

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

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

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())
v_array = sorted([int(x) for x in input().split()])
now =0
for i in v_array:
    now += 1/i
print(1/now)

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())
num = [int(i) for i in input().split()]

inv = [1/i for i in num]

sum = 0
for i in inv:
	sum += i

print(1/sum)

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

Solution (Python):



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

    mul = 1
    for Ai in A:
        mul *= Ai

    mulA = []
    sumA = 0
    for Ai in A:
        temp = mul/Ai
        mulA.append(mul/Ai)
        sumA += temp

    ans = mul/sumA
    print(ans)


if __name__ == "__main__":
    main()