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:
import numpy as np
N = int(input())
A = list(map(int,input().split()))
B = np.zeros(N,dtype="float64")
for i in range (0,N):
  B[i] = 1 / A[i]
y = 1 / sum(B)
print(y)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
input()
a = [int(i) for i in input().split()]
print(1 / reduce(lambda x, y: x + 1/y, [0] + a))

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int,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()))

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

Submission status: Accepted

Solution code:
num = int(input())
arr = list(map(int,input().split()))

arr_inv = [1/i for i in arr]

print(1/sum(arr_inv))

Submission status: Accepted

Solution code:
n = int(input())
y = []

a = input().split()
for i in range(n):
    x = 1/int(a[i])
    y.append(x)
#print(y)

s = sum(y)
an = 1/s

print(an)

Submission status: Accepted

Solution code:
import numpy as np
a = input()
a = int(a)
n = input().split()
n = [int(n[i]) for i in range(a)]

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

print(1/sum)

Submission status: Accepted

Solution code:
from sys import exit, stdin
from itertools import combinations
N = int(stdin.readline().rstrip())
A = [int(_) for _ in stdin.readline().rstrip().split()]
print(1/sum(1/a for a in A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    N = int(input())
    s = input().split()
    sum = 0

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
a_lst = [1/int(x) for x in stdin.readline().rstrip().split()]

print(1/sum(a_lst))

Submission status: Accepted

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

print(1/(sum(1/x for x in arr)))

Submission status: Accepted

Solution code:
N = int(input())
s = input().split()
sum = 0

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
print('{:.16g}'.format(1 / sum(1 / x for x in A)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_=input()
li=list(map(int,input().split()))

sum_=0
for i in li:
  sum_+=1/i
print(1/sum_)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
bunsi = 1
bunbo = 0
for a in A:
    bunsi *= a

for a in A:
    bunbo += bunsi / a

print(bunsi/bunbo)

Submission status: Accepted

Solution code:
n = input()
arr = input().split(" ")

bunshi = 1

for num in arr:
  bunshi *= int(num)

bunbo_list = []
for num in arr:
  bunbo_list.append(bunshi / int(num))
  
bunbo = sum(bunbo_list)
ans = bunshi / bunbo
print(ans)

Submission status: Accepted

Solution code:
N, = (int(x) for x in input().split())
A_arr = [int(x) for x in input().split()]

print(1.0/sum([1.0/x for x in A_arr]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == "__main__":

    n = int(input())
    a_list = map(int, input().split())
    
    sum = 0.0
    for a in a_list:
        sum += 1/a
        
    print('{0}'.format(1/sum))

Submission status: Accepted

Solution code:
n = int(input())
data = [int(s) for s in input().split()]

ans = 0

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

print(1/ans)

Submission status: Accepted

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

Submission status: Accepted

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

a = 1/(sum)
 
print(a)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main(a=[]):
    S = 0
    for item in a:
        S += 1 / item

    print(1/S)


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

    main(a)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(i) for i in 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()))

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

Submission status: Accepted

Solution code:
from fractions import Fraction
li = lambda: list(map(int, input().split()))
N = int(input())
A = li()
i = 0
for a in A:
  i += Fraction(1, a)
print(i.denominator / i.numerator)

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

total = 0
for num in list:
    total += 1 / num

print(1 / total)

Submission status: Accepted

Solution code:
N = int(input())
numbers = map(int, input().split(" "))
invs = map(lambda x: 1.0 / x, numbers)
print(1.0 / sum(invs))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

print(1/num)

Submission status: Accepted

Solution code:
#k,x=map(int,input().split())
#p_3,p_4=map(int,input().split())
n=int(input())
#r=[int(input()) for _ in range(n)]
a=list(map(int,input().split()))
#b=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#a=[list(map(int,input().split()))for _ in range(n)]
#m=[list(input().split())for _ in range(n)]
total=0
for i in range(n):
    total+=1/a[i]
print(1/total)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
alist = map(float, input().split())
sum = 0.0
for a in alist:
  sum += 1/a
print(1.0 / 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())
arr = list(map(int, input().split()))
ans = 0
for i in arr:
    ans += 1 / i
ans = 1 / ans
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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]
ans = 1/ans

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
arr = list(map(lambda n: int(n), input().split()))
denominator = 0

for n in range(N):
    denominator += 1/arr[n]

print(1/denominator)

Submission status: Accepted

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

Submission status: Accepted

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

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


print(1/seq)

Submission status: Accepted

Solution code:
N = int(input())
a = list()
for elem in input().split(' '):
    a.append(int(elem))

sum = 0;
for number in a:
    sum+=1/number

print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(1/num)

Submission status: Accepted

Solution code:
N = int(input())
Alist = list(map(int,input().split()))
Sum = 0

for A in Alist:
	Sum = Sum + 1 / A

print(1/Sum)

Submission status: Accepted

Solution code:
n1 = int(input())
n2 = list(map(int, input().split()))
n3 = [1/n2[i] for i in range(len(n2))]
print(1/(sum(n3)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
li = [int(num) for num in input().split()]

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


print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a=list(input().split())
A=[int(i) for i in a]
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()))
l = []
 
for i in a:
  l.append(1/i)
  
print(1/sum(l))

Submission status: Accepted

Solution code:
def _input():
    number = input()
    array = input().split()
    number_array = []
    for i in array:
        number_array.append(int(i))
    return number_array

def sum(array):
    total = 0
    for i in array:
        total += (1 / i)
    return total

def output(number):
    return (1 / number)


if __name__ == "__main__":
    number_array = _input()
    total = sum(number_array)
    print(output(total))

Submission status: Accepted

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

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

print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = input()
A = input().split()
A = np.array(A).astype(int)
res = 0.0
for a in A:
    res += 1/a
print(1./res)

Submission status: Accepted

Solution code:

from fractions import Fraction

def inverse(f):
    d = f.denominator / f.numerator
    return d

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

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

print(inverse(c))

Submission status: Accepted

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

print(1.0 / sum(A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    ans = 0

    for i in a:
        ans += 1/i

    print(1/ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
  N = input()
  arr = list(map(int,input().split()))
  sum = 0.0
  for i in range(len(arr)):
    sum += 1 / arr[i]
  
  print(1/sum)
  
main()

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    A = list(map(int, input().split()))
    rec = sum([1 / x for x in A])
    print(1 / rec)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
List = [] * N
List = input().split(" ")
Sum = 0
for i in range(N):
  Sum += 1/(int(List[i]))
print(1/Sum)

Submission status: Accepted

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

num = int(input())
int_list = [int(i) for i in input().split()]

rtn = 0.0

for i in int_list:
  rtn += 1/i

rtn = 1/ rtn

print(rtn)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for data in li:
	#data = int(input())
	ans += 1 / data	

print(round(1/ans, 15))

Submission status: Accepted

Solution code:
N = int(input())
arr = input()

hoge = arr.split(" ")

mother = 0
for i in hoge:
  mother = mother + 1 / int(i) 

print(1/mother)

Submission status: Accepted

Solution code:
import numpy as np

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

print(1/((1/Ai).sum()))

Submission status: Accepted

Solution code:
n = int(input())
a = []
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(a) for a in input().split()]
ans = 0
for a in A:
  ans += 1/a
ans = 1/ans
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
max = int(input())
li = list(map(int,input().split()))
l = []
for num in li:
    l.append(1.0/num)
print(1.0/sum(l))

Submission status: Accepted

Solution code:
n = int(input())

temp = 0

for i in map(int, input().split()):
  temp += 1 / i
  
print(1 / temp)

Submission status: Accepted

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

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:
n = int(input())
a_arr = list(map(int,input().split()))
a_sum = 1
for i in a_arr:
    a_sum *= i

ans_u = 0
for i in a_arr:
    ans_u += a_sum//i

print(a_sum/ans_u)

Submission status: Accepted

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

product = 1
for number in numbers:
    product *= number

bumbo = 0
for number in numbers:
    bumbo += product // number

print(product/bumbo)

Submission status: Accepted

Solution code:
N = int(input())
L = input().split()
c = 0
for a in range(N):
    c = c + 1/int(L[a])
print(1/c)

Submission status: Accepted

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

ans = 1 / ans

print(ans)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = list(map(int, input().rstrip('\n').split()))
    t = 0
    for i in a:
        t += (1 / i)
    print(1 / t)


if __name__ == '__main__':
    slove()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce

n = int(input())
a = [float(i) for i in input().split(' ')]
a = [1/i for i in a]
print(1 / reduce(lambda x, y : x + y, a))

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0

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

print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
ans = 0.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()))
sum = 0

for i in a:
    sum += 1 / i


print(1 / sum)

Submission status: Accepted

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

su = 0

for s in s_l:
    su += 1/s

print(1/su)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=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()))
k = []
for i in range(n):
    k.append(1/a[i])
print(1/sum(k))

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 = input().split()
Reciprocal_A_list = [1/int(A_list[i]) for i in range(N)]
print(1/sum(Reciprocal_A_list))

Submission status: Accepted

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

total_mul = 1.0
for i in listA:
  total_mul *= i

bunbo = 0.0
for i in listA:
  bunbo += total_mul / i

print(total_mul / bunbo)

Submission status: Accepted

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

plist = [1/m for m in alist]
print(1 / sum(plist))

Submission status: Accepted

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

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

print(1/ans_r)

Submission status: Accepted

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

Submission status: Accepted

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

tmp1 = 1
tmp2 = 0

for i in range(N):
    tmp1 = tmp1 * num_list[i]

for i in range(N):
    tmp2 += tmp1 / num_list[i]

print(tmp1/tmp2)

Submission status: Accepted

Solution code:
n = int(input())
an = [int(elm) for elm in input().split()]

sum_an = 0

for a in an:
    sum_an += 1/a

print(1/sum_an)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c=1
for y in A:
    c=c*y 
d=0
for y in A:
    d=d+(c/y)
q=c/d
print(q)

Submission status: Accepted

Solution code:
num=int(input())
S=input().split(" ")
ans=float(0)
for i in range(num):
	ans+=1/int(S[i])
print(1/ans)

Submission status: Accepted

Solution code:
n = int(input())
a_n = input().split(" ")
rev = float(0)
for i in range(n):
  rev += 1/int(a_n[i])
print(1/rev)

Submission status: Accepted

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

Submission status: Accepted

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

result = (1 / sum(1 / i for i in numList))
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_ = input()
a_list = list(map(int, input().split()))
bunshi = 1
for a in a_list:
    bunshi *= a
bunbo = sum(map(lambda x: bunshi / x, a_list))
print(bunshi/bunbo)

Submission status: Accepted

Solution code:
# coding: utf-8
n = int(input())

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

B = []
C = 0

for k in range(n):
    B.append(1/A[k])

for l in range(n):
    C = B[l] + C
    
print(1/C)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
numlist=input()
nums=numlist.split(" ")
nums=[float(s) for s in nums]
inverse=0.0
for i in range(len(nums)):
    inverse+=1/nums[i]
print(1/inverse)

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(float,input().split()))
tmp = 0
for i in range(N):
  tmp = tmp + (1/A[i])
tmp= 1/tmp
print(tmp)

Submission status: Accepted

Solution code:
N = int(input())
input_str = input()
array_strs = input_str.split(" ")
sum_recip = 0.0

for i in range(N):
    sum_recip += 1 / float(array_strs[i])

print(1 / sum_recip)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(1/s)

Submission status: Accepted

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

div = 0

for i in range(n):
  div += 1/ai[i]
  
print(1/div)

Submission status: Accepted

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

b = 1 / sum(map(lambda x:x / x ** 2,a))

print(b)

Submission status: Accepted

Solution code:
# 整数
N = input()

# 整数
A = input()

A = A.split(' ')
a = [1/int(i) for i in A]
b = 0
for i in a:
    b += i
    
print(1/b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp = float()

for i in l:
  tmp += float(1/i)

print(1/tmp)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())
print('{:.16g}'.format(1/sum(1/x for x in A)))

Submission status: Accepted

Solution code:
import math
N = int(input())
nums = list(map(int,input().split(" ")))

ans = 0
for num in nums:
    ans += (1/num)
print(1/ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
    """ main """
    N = int(input())
    AS = map(int, input().split())
    print(1/sum([1/a for a in AS]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

print(1/sum(1/x for x in A))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

rev = [1/i for i in n]
rev = 1/sum(rev)
print(rev)

Submission status: Accepted

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

Submission status: Accepted

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

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

down = 0
for i in range(N):
    buf=1
    for j in range(N):
        if i==j: continue
        buf*=A[j]
    down+=buf
print(up/down)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

import numpy as np
A = np.array([A])
print(1/np.sum(1/A))

Submission status: Accepted

Solution code:
# -*- coding:utf8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
#input = open(sys.argv[1], "r").readline

def main():
    _ = int(input())
    A = list(map(int, input().split()))
    s = 0
    for a in A:
        s += 1/a
    print(1/s)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
max = int(input())
num = list(map(int, input().split(" ")))

i = 0
tmp = 0
while i < max:
    tmp = 1/(num[i]) + tmp
    i = i + 1
    
ans = 1/tmp
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0.0
for n in A:
    ans += float(1)/n

print(float(1)/ans)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a = list(map(int, input().rstrip('\n').split()))
    t = 0
    for i in a:
        t += (1 / i)
    print(1 / t)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 1/ans
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
int_list = input().split()
tmp = 0.0
for i in int_list:
    tmp += 1/int(i)
    #reverse_list.append(1/i)
print( 1 / tmp )

Submission status: Accepted

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