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.



Sample input:
2
10 30


Sample output:
7.5

Submission status: Accepted

Solution code:
from fractions import Fraction
n = int(input())
a = list(map(int, input().split()))

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

print(float(Fraction(1, d)))

Submission status: Accepted

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

print(1/s)

Submission status: Accepted

Solution code:
N = int(input())

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

all = 0
for a in a_list:
    b = 1 / a
    all += b

print(1/all)

Submission status: Accepted

Solution code:
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A


if __name__ == '__main__':
    N=int(input())
    A = InputToInt()
    su = 0
    for i in range(N):
        su += 1.0/A[i]
    print(1.0/su)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

bunbo = 0

for elm in a:
  bunbo += 1/elm

print(1/bunbo)

Submission status: Accepted

Solution code:
n = int(input())
def f(x):
    return 1 / int(x)
sum = sum(list(map(f, input().split())))

print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1.0/sum)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    A = LI()
    prod_sum = 0
    prod_a = 1
    for a in A:
        prod_a *= a
    for a in A:
        prod_sum += (prod_a/a)
    ans = prod_a/prod_sum
    print(ans)
main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in input().rstrip().split()]

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

print(1/sum)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''
#codeforces1203A_live
gi = lambda : list(map(int,input().split()))
n, = gi()
l = gi()
print(1 / sum([1 / e for e in l]))

Submission status: Accepted

Solution code:
from scipy import stats

N = int(input())
A = list(map(int, input().split()))
print(stats.hmean(A) / N)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(item) for item in input().split()]

base = 0
for item in a:
    base += 1.0 / item

print(1.0 / base)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
s=list(map(int,input().split()))

goukei=0

for item in s:
  goukei+=1/item
  
  #print(goukei)
  
print(1/goukei)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
child = 1 
mother = 0
for i in a:
  child *= i
for i in a:
  mother += child / i
print(child / mother)

Submission status: Accepted

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

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

print(1/s)

Submission status: Accepted

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

Submission status: Accepted

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

A = [1/x for x in A]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1/s)

Submission status: Accepted

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

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

    print( 1 / sumA ) 


main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1/s)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

i  = lambda: int(input())
li = lambda: list(map(int, input().split()))

N = i()
A = li()

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

print(1 / count)

Submission status: Accepted

Solution code:
n = int(input())
s = input().split()
p=0
for i in s:
    p+=1/int(i)
print(1/p)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1/s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
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 = onem()

a = l()

su = 1
s = 0
for i in range(n):
    su *= a[i]

for i in range(n):
    s += su/a[i]

print(su/s)

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

Solution code:
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    N = int(input())
    A = [int(c) for c in input().split()]
    num = 0
    for i in range(N):
        num += 1 / A[i]
    print(1/num)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(1/ans)

Submission status: Accepted

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

result = 0
for j in a:
    result += 1/j
print(1/result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def p_b():
    N = int(input())
    A = list(map(int, input().split()))

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

    print(1 / a)


if __name__ == '__main__':
    p_b()

Submission status: Accepted

Solution code:
n = int(input().split()[0])
a_list = list(map(int, input().split()))

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

Submission status: Accepted

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

print(1/sum(A))

Submission status: Accepted

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

Submission status: Accepted

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

ans = sum(1/a for a in A)
ans **= -1

print(ans)

Submission status: Accepted

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

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

print(1/ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
input()
array = [int(x) for x in input().split()]

inv_list = [1/num for num in array]

print(1 / sum(inv_list))

Submission status: Accepted

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

p = 1
for v in a:
    p *= v

b = 0
for v in a:
    b += p / v
print(p/b)

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
a=np.sum(1/np.array([int(i) for i in input().split(" ")]))
print(1/a)

Submission status: Accepted

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

tmp = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    a = list(map(int, input().split()))
    ans = 1 / sum([1 / ai for ai in a])
    print(ans)


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
n = int(input())
an = list(map(int, input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from fractions import Fraction

N = int(input())
sum = 0
for a in map(int, input().strip().split()):
	sum += Fraction(1, a)

print(float(1 / sum))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1/ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

print(1/bunbo)

Submission status: Accepted

Solution code:
def main():
    _ = int(input())
    a = map(int, input().split())

    ans = 1 / sum([1 / aa for aa in a])
    print(ans)


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(ii) for ii in input().split()]

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

Submission status: Accepted

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

k = 0

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

print(1 / k)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

bunbo = 0 

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

print(1/bunbo)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
A = LIST()

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
# pp = sum(a)

su = 0
p = 1
for i in a:
	p *= i

for i in a:
	su += (p/i)

print(p/su)

Submission status: Accepted

Solution code:
n = int(input())

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

ans = 0

for a in A:
  ans += 1 / a

print(1/ans)

Submission status: Accepted

Solution code:
n = int(input())
A = [1/int(el) for el in input().split(' ')]
B = sum(A)
print(1/B)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split()))
su = 1
for i in range(n):
    su = su* a[i]
b = []
for i in range(n):
    b.append(su/a[i])

hoge = 0
for i in range(n):
    hoge += b[i]

print(su/hoge)

Submission status: Accepted

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

print(1/sum)

Submission status: Accepted

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

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

print(temp)

Submission status: Accepted

Solution code:
N = int(input())
As = [float(s) for s in input().split()]

t = 1
for a in As:
    t *= a

print(t / sum([t / a for a in As]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 1/sans

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

ans = 1.0 / sum_a

print(ans)

Submission status: Accepted

Solution code:
words = lambda t : list(map(t, input().split()))
n = int(input())
a = words(int)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

ans = 1/sum(a)

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
As = [int(s) for s in input().split()]

ans = 0
for a in As:
  ans += float(1/a)
  
print(float(1)/ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, input().split()))
sum = 0

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

print(1/sum)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,input().split())) #input from array of integer like "1 2 3"

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

print(1/ans)

Submission status: Accepted

Solution code:
n = int(input())

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

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

print(1/ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

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

    l = [1.0 / a for a in al]
    print(1.0 / sum(l))

Submission status: Accepted

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

for v in A:
    ans += 1/v

print(1/ans)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split()))
tmp = 0
for i in range(N):
    tmp += 1.0/A[i]
res = 1.0 / tmp
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0

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

print(1 / ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
n = int(input())
a_list = list(map(int, input().split()))

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

Submission status: Accepted

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

print(1/s)

Submission status: Accepted

Solution code:
N = int(input())
As = list(map(int, input().split()))
r = 1/sum(map(lambda A: 1/A, As))
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n=int(input())
    aa=map(int, input().split())
    s=0
    for a in aa:
        s+=1/a
    print(1/s)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

print (1 / x)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1/s)

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int,input().split()))
su = 1
for i in li:
    su *= i
seki = 0
for i in li:
    seki += su//i
print(su/seki)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N = readInts()[0]
  A = readInts()

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

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
N = int(input())
A = [int(_) for _ in input().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
print(1 / sum(1 / e for e in map(int, input().split())))

Submission status: Accepted

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

ansinv = 0.0

for a in A:
    ansinv += 1 / a

print(1 / ansinv)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(1/total)

Submission status: Accepted

Solution code:
n = int(input())
l = list(map(int, input().split()))

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

print(1/a)

Submission status: Accepted

Solution code:
n=int(input())
A=[int(o) for o in input().split()]
ans=0
for num in A:
    ans+=1/num

print(1/ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys

input = sys.stdin.readline

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

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

main()

Submission status: Accepted

Solution code:
n,*A=list(map(int,open(0).read().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
lst = list(map(int, input().split()))
s = 0
for elem in lst:
    s+= 1/ elem
print(1/s)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1/ans)

Submission status: Accepted

Solution code:
def foo(a) :
  return 1/sum(1/x for x in a)
n = int(input())
a = list(map(int, input().split()))
print(foo(a))

Submission status: Accepted

Solution code:
n=int(input())
s=0.0
p=input().rstrip().split(' ')
for i in range(0,len(p)):
    s+=(1/int(p[i]))
print(1/s)

Submission status: Accepted

Solution code:
n = int(input())

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

s = 0

for i in a:
    s += 1/i

print(1/s)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
wa = 0

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

print(1./wa)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(1/ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(1/sum_)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
class Solution:
    def main(self):
        N = int(input())
        A = list(map(int, input().split()))
        cum = 0
        for i in range(N):
            cum += 1/A[i]

        print(1/cum)


if __name__ == '__main__':
    Solution().main()

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int,input().split(' ')))
iA = [1/a for a in A]
ians = sum(iA)
print(1/ians)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

mul = 1
for a in As:
    mul *= a

s = 0
for a in As:
    s += mul // a

print("{:.15f}".format(mul / s))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
astr = input().split()
A = [int(d) for d in astr]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1/result)

Submission status: Accepted

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