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 a in a_list:
    total += 1 / a

print(1 / total)

Solution (Python):
N=int(input())
Alist=[int(n) for n in input().split()]
bunnshi=1
for i in Alist:
    bunnshi *= i

bunnbo=0
for i in Alist:
    bunnbo += bunnshi/i

Ans=bunnshi/bunnbo
print(Ans)

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

Solution (Python):
N = int(input())
A_list = list(map(int,input().split()))
sum_list = []
for i in range(N):
    sum_list.append(1/A_list[i])

Sum = sum(sum_list)
print(1/Sum)

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

n = int(inputs[0])
a_list = list(map(int, inputs[1].split()))

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

Solution (Python):
import random
import math
import collections
import itertools
import functools
import operator
import os
import sys

ri = lambda: map(int, raw_input().split())
def pi(a): print (' '.join(map(str, a)))

from fractions import Fraction
n = input()
a = ri()

print float(1/sum(Fraction(1, x) for x in a))

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

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

Solution (Python):
def solve(n:int, l:list):
    cnt = 0
    for i in range(n):
        cnt += 1/l[i]
    return 1/cnt

def main():
    n = int(input())
    l = list(map(int, input().split(" ")))
    print(solve(n, l))

if __name__ == "__main__":
    main()

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

res = 0
for e in a:
    res += 1/e
print(1/res)

Solution (Python):

n = int(input())
numbers = list(map(int,input().split()))
sum = 0
ans = 0

for i in range(len(numbers)):
	sum = sum + 1 / numbers[i]

ans = 1 / sum

print(ans)

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

*A, = 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 = list(map(int,input().split()))
total = 1
total2 = 0

for a in a_list:
    total = total * a
for a in a_list:
    total2 = total/a + total2

print(total/total2)

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

Solution (Python):
n = int(input())
a = list(map(int, input().split()))
import fractions
from functools import reduce

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

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
lcm = lcm(*a)
li = []
for i in range(n):
    li.append(lcm // a[i])
print(lcm/sum(li))

Solution (Python):
n=int(input())
apai=1
ans=0
a =list(map(int,input().split()))
for i in a:
	apai*=i
for i in range(n):
	A=a.copy()
	A[i]=1
	data = 1
	for j in A:
		data*=j
	ans+=data
print(round(apai/ans,6))

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

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

stock = 0

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

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

Solution (Python):
def solve():
    n = int(input())
    a =  list(map(int, input().split()))
    total = 0.0
    for i in range(n):
        total += (1.0 / a[i])
    print(1.0/total) 

if __name__ == "__main__":
    solve()

Solution (Python):



import sys
import re

n = int(input())
a = list(map(lambda n: 1/int(n), input().split()))

print(1/sum(a))

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

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

t = 0
for x in a:
  t += s / x

print("{:.5f}".format(s / t))

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

A_=list(map(lambda x:1/x,A))

print(1/sum(A_))

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

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

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

print(1/ans)

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(*num):
  return reduce(lcm_base, num, 1)
c=0
for i in range(N):
  X=lcm(*A)
  if X>c:
    c=X
under=c
over=0
for a in A:
  over+=c//a
print(under/over)

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(float, input().split()))

import numpy as np
print(np.reciprocal(sum(np.reciprocal(np.array(A)))))

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

Solution (Python):
from fractions import Fraction

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

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

bunshi = num.numerator
bunbo = num.denominator

ans = bunbo / bunshi
print('{:05f}'.format(ans))

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

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

ans = 0

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

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

A = input().split(" ") 

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

Solution (Python):
N = int(input())
v = list(map(int, input().split()))
rev = []

for i in range(N):
  rev.append(1/v[i])
  
print(1/sum(rev))

Solution (Python):

import os,re,sys,operator,math,heapq,string
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations,groupby
from sys import stdin,setrecursionlimit
from copy import deepcopy

setrecursionlimit(10**6)

n=int(stdin.readline().rstrip())
a=[int(i) for i in stdin.readline().rstrip().split()]
cnt=0
for i in range(n):
    cnt+=1/a[i]
print(1/cnt)

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

bunbo = max(a_list)
bunshi = 0

for a in a_list:
    bunshi += (bunbo/a)

print(bunbo/bunshi)

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

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

def mul_sum(list):
    mulsum = 0
    for i in range(len(list)):
        tmp = list[:]
        tmp.pop(i)
        mulsum = mulsum + mul(tmp)
    return(mulsum)


def mul(list):
    mul = 1
    for i in range(len(list)):
        mul = mul*list[i]
    return(mul)


print(mul(a_n)/mul_sum(a_n))

Solution (Python):
from fractions import gcd

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

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

l=1
for a in A:
	l=lcm(l,a)

x=0
for a in A:
	x+=l/a
	
print float(l)/x

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):
def main() -> None:
    N = int(input())
    A = [int(a) for a in input().split()]
    sum = 0
    
    for i in range(N):
        sum += 1.0/A[i]
        
    print(1.0/sum)
        
main()

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

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

ans = 0.00000

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

print(1/ans)

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

for AN in A:
    ans += 1 / AN

print(1 / ans)

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

print(X/num)

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

a = np.array(a)
s = 1/np.sum(1/a)
print(s)

Solution (Python):
import fractions
n = int(input())
a = list(map(int,input().split()))
a.sort()
if n==1:
    print(*a)
else:
    s = a[0]
    for i in range(1,n):
        s = s * a[i] / fractions.gcd(s, a[i])
    ans = 0
    for i in a:
        ans += s/i
    print(s/ans)

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

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

A = [saikou * 1.0 / i for i in A]
print(1.0 * saikou / sum(A))

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

rev_sum = 0
for a in A[::-1]:
    rev_sum += 1 / a

print(1/rev_sum)

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

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

numerator = 0

for a in A:
    numerator += 1 / a

print(1 / numerator)

Solution (Python):
import fractions
n = int(input())
a = list(map(int, input().split()))
lcm = 1
for i in a:
    lcm = lcm * i // fractions.gcd(lcm, i)
t = 0
for i in a:
    t += lcm / i
print(lcm / t)

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

print(1/m)

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

a=sum(l)
ans=1/a

print(ans)

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

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

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

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

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

ans = 1/b
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())
l = [int(i) for i in input().split()]
l2 = []
for i in l:
    l2.append(1 / i)

print(1 / sum(l2))

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations
import sys
import bisect
import string
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
mo=10**9+7

n=I()
a=LI()
ans=0
while a:
    ans+=1/(a.pop())
print(1/ans)

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

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

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

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

a.sort()

su = 0

a = np.array(a)

one = np.array([1]*n)

su = one/a
su = su.tolist()
su = sum(su)

print('%.6f' %(1/su))

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

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

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

Solution (Python):
N = int(input())
A = list(map(int, input().split())) 
ans1=0
b=0
while b<N:
    ans1=ans1+1/A[b]
    b=b+1
else:
    ans2=1/ans1
    print(ans2)

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

Solution (Python):
import math

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

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


print(float(1/ans))

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

Res = 0.0
for v in V:
	Res += 1.0/v

print(1.0/Res)

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

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

Solution (Python):
def main():
    n = int(input())
    a = input().split()

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


if __name__ == "__main__":
    main()

Solution (Python):
import numpy as np
N = int(input())
A_list = [int(i) for i in input().split(" ")]
ans = 0
for i in range(N):
    ans += 1 / A_list[i]
print(1 / ans)

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

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

sum = 1.0
bunbo = 0.0
for i in A:
    sum *= i

for j in A:
    bunbo += sum/j

print(sum/bunbo)

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

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

sum = 1/sum

print(str(sum))

Solution (Python):
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

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


n = int(input())
temp = 1
ans = 0
a = list(map(int, input().split()))
for i in a:
    temp = lcm(temp, i)

for i in a:
    ans +=  int(temp/i)

print(temp/ans)

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

index = 0
nums = list(map(int,input().split()))




child_sum = 0.0
while index < n:
    child_sum = child_sum + 1/nums[index]
    index = index + 1


print('{}'.format(1/child_sum))

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

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

print(1/ans)

Solution (Python):
import numpy as np

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

nA = np.array(A)
print(np.reciprocal(np.sum(np.reciprocal(nA))))

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

Solution (Python):
import numpy as np
def acinput():
    return list(map(int,input().split(" ")))

N=int(input())
a=acinput()

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

sum =0

for i in A:
    sum += 1/i

print(1/sum)

Solution (Python):
import sys
from fractions import Fraction
input = sys.stdin.readline


def main():
    N = int(input())
    A = list(map(lambda x: Fraction(1, int(x)), input().split()))

    print(float(1 / sum(A)))


if __name__ == "__main__":
    main()

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

Solution (Python):
num=int(input())
a_array=list(map(int,input().split()))
allmul=1
for a in a_array:
    allmul*=a
denominator=0
for a in a_array:
    denominator+=allmul//a
print(allmul/denominator)

Solution (Python):
import numpy as np

N = int(input())

a = list(map(int,input().split()))
a = np.array(a, dtype="float")
a = np.reciprocal(a)

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

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

result = 0

for i in alist:
  result += 1/i

result = 1 / result

print(result)

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

Solution (Python):
a = list(open(0))
for i in a:
    s = i.replace('\n','')
    txt = s.split(' ')

res = 0
for i in txt:
    res += 1/int(i)

print(1/res)

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

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

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
LIST = lambda: list(map(int, INPUT().split()))

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    A = LIST()
    InvA = []

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

    print(1/sum(InvA))


if __name__ == '__main__':
    main()

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

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

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

print(1 / ans)

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

total = 1
sum = 0

for i in range(N):
    total = total * List[i]

l = []
for i in range(N):
    l.append(total / List[i])
    
for i in range(N):
    sum = sum + l[i]
    
result = total / sum

print(result)

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

lis = list(map(lambda x: 1/x ,lis))

sum = 0
for i in range(n):
    sum += lis[i]

print(1/sum)

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

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

print(ans)

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

for i in range(N):
  d += 1/l[i]

print(1/d)

Solution (Python):



n = int(input())
numbers = map(int, input().split())

rev = []
for i in numbers:
    rev.append(1 / float(i))

revsum = 0
for i in range(n):
    revsum = revsum + rev[i]

print(1/revsum)

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

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

aaa = []
for i in numbers:
    b = Fraction(1,i)
    aaa.append(b)

ans = inverse(sum(aaa))

print(float(ans))

Solution (Python):
def gyakusuu(x):
  return 1 / x

y = int(input())
z = [int(x) for x in input().split()]
a = [gyakusuu(i) for i in z]
sum1 = 0
for i in range(y):
  sum1 += a[i]
print(gyakusuu(sum1))

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

bunbo=0

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

ans=1/bunbo

print(ans)

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

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

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

import functools
import operator

mul = functools.reduce(operator.mul, l)
mm = 0
for i in range(len(l)):
  mm += mul/l[i]
res=mul/mm
print(res)

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

b = 0
for ax in a:
    b += 1/ax

print(1/b)

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

res = 0
for i in a:
    res += (1 / i)

res = 1 / res

print(res)

Solution (Python):


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

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

print(1 / sum)

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

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

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

def reciprocal(n):
    return 1 / n

rec_A = list(map(reciprocal, A))

print(1 / sum(rec_A))

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 fractions import Fraction

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

for i in A:
  ans += 1/i

ans = 1 / ans

print(ans)

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

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

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 = input()
a = input().split(' ')

denom = 0
for i in a:
    denom += (1 / int(i))

print(1 / denom)

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

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

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

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

print(float(1 / sum([1/i for i in s])))

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

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

Solution (Python):



def solve(N, A):
    ans = 1.0 / sum([1.0 / n for n in A])
    return ans


if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))

    ans = solve(N, A)

    print(ans)

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

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

Solution (Python):
from sys import stdin
n = int(input())
a = [int(x) for x in stdin.readline().rstrip().split()]

sum1 = 0


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

print(1/sum1)

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 range(n):
    ans+=1/a[i]

print(1/ans)

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

Solution (Python):
import sys
from collections import deque
import heapq
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
a = IL()

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

print(1/num)

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

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

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

ans = 1/sum(number)

print(ans)

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

print(1/Ans)

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

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

print(1 / output)

Solution (Python):
from fractions import Fraction

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




sum = 0
for a in A_list:
    sum = sum + Fraction(1, a)


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

Solution (Python):
from fractions import Fraction

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

total = Fraction(1, A[0])
for i in A[1:]:
    total += Fraction(1, i)

print(float(1 / total))

Solution (Python):
import fractions

N = int(input())
A = list(map(int, input().split()))
b = 0
for a in A:
    b += fractions.Fraction(1, a)
print(float(fractions.Fraction(1, b)))

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

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

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

Solution (Python):

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

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

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

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

Solution (Python):

n=int(input())
l=[int(x) for x in input().split()]
m=1
su=0
for i in l:
	m*=i
for i in l:
	su+=(m//i)
ans=1
for i in l:
	ans=(ans*i)
print(ans/su)

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

bunbo = 0
bunshi = 1
for i in range(N):
    tmp = 1
    for j in range(N):
        if i == j:
            continue
        else:
            tmp *= A[j]
    bunbo += tmp
    bunshi *= A[i]
    
print(bunshi/bunbo)

Solution (Python):
import numpy as np
N = int(input())

n_list = list(map(float,input().split()))

ans = 0

for i in n_list:
	ans += np.reciprocal(i)

print(np.reciprocal(ans))

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

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

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

print(ans)

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

print(1/sum)

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

invlist = []

for k, v in enumerate(list):
    value = 1 / v
    invlist.append(value)

total = 0
for x in invlist:
    total += x

print (1 / total)

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

mul = 1
for i in inList:
    mul*=i

sumList = 0
for i in inList:
    sumList += mul/i
    
res = mul/sumList
print(res)

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

bunsi=1
for i in ls:
    bunsi*=i
souseki=bunsi
bunbo=0
for i in ls:
    bunbo+=souseki/i

print(bunsi/bunbo)

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


print(1/sum(list(map(lambda n: 1/n, a))))

Solution (Python):
def f_b():
    n = int(input())
    a = list(map(int, input().split()))
    o = sum([i**-1 for i in a])**-1

    print(o)

if __name__ == "__main__":
    f_b()

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

num = 0
ans = 0
for i in a:
  a[num] = 1/i
  ans += a[num]
  num += 1
  
print(1/ans)

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

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

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

B = [0.0]*N
sum = 0.0

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

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

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

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

print(1/s)

Solution (Python):
def main():
    n = int(input())
    aa = input().split(' ')
    gyakusu = map(lambda x: 1/int(x), aa)
    summ = sum(gyakusu)
    print(str(1/summ))


if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
a=[int(x) for x in input().split()]
b=[]
for i in range(n):
  b.append(1/a[i])
s=sum(b)
s=1/s
print(s)

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

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

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

Solution (Python):
from fractions import Fraction

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

ans = 1.0 / sum([Fraction(1, ai) for ai in a])
print(ans)

Solution (Python):
import fractions
def gcd(x,y): return fractions.gcd(x,y)
def lcm(a,b): return a*b//fractions.gcd(a,b)

n=int(input())
a=[int(i) for i in input().split()]
x=a[0]
for i in range(1,n):
    x=lcm(x,a[i])
ans=chk=0
for i in a:
    ans+=x//i
print(x/ans)

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

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

print(1.0 / sum_a)

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

lines = sys.stdin.readlines()

n = int(lines[0])
pieces = lines[1].strip().split(' ')
ans = 0
for i in range(n):
    ans += 1.0 / int(pieces[i])

print(1.0 / ans)

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

Solution (Python):



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

sum = 0

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

Solution (Python):
from functools import reduce
from operator import mul
n = int(input())
Alist = [int(i) for i in input().split()]
a = reduce(mul,Alist)
c = 0
for i in range(n):
    c += a/Alist[i]
print(a/c)

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

    total=0.0
    for a in A:
        total+=1/a
    print(1/total)

main()

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return list(map(float, sys.stdin.readline().split()))
def LS():return sys.stdin.readline().split()
def SR(n): return [list(sys.stdin.readline())[:-1] for i in range(n)]
def IR(n): return [int(sys.stdin.readline()) for i in range(n)]
def LIR(n): return [list(map(int, sys.stdin.readline().split())) for i in range(n)]
def LSR(n): return [list(map(list, sys.stdin.readline().split())) for i in range(n)]
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
sys.setrecursionlimit(1000000)
INF = float('inf')
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

N = I()
A = LI()

ans = 0

for a in A :
    ans += (1.0 / a)

print(1.0 / ans)

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

sum = 0
for d in data:
  sum = sum + (1/int(d))
  
print(1/sum)