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:
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 = map(int,input().split())
su = 0
for i in a:
    su += 1.0 / i
print(1.0/su)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A_list = list(map(int,input().split()))
A_gyakusu = [1/i for i in A_list]
A_gyakusu_souwa = sum(A_gyakusu)
print(1/A_gyakusu_souwa)

Submission status: Accepted

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

def main():
    n = int(input())
    a_list = list(map(lambda x: 1 / x, map(int, input().split())))

    print(1 / sum(a_list))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

print(1 / s)

Submission status: Accepted

Solution code:
N = int(input())
a = list(1/int(i) for i in input().split())

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

Submission status: Accepted

Solution code:
import math
import sys
import queue
from collections import Counter
from itertools import accumulate
from fractions import gcd
from functools import reduce


def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

sys.setrecursionlimit(10000)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

if __name__ == "__main__":
    n= int(sys.stdin.readline())
    a= list(map(float, sys.stdin.readline().split()))
    l=[]
    for i in a:
        t=1/i
        l.append(t)
    ans=1/sum(l)
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

bo = 0

for ai in a:
    bo += 1/ai

si = 1 / bo

print(si)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
B = sum(1/A)
print(1/B)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
n = input()
a = list(map(int, input().split()))
print(1/sum([1/ai for ai in a]))

Submission status: Accepted

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

Submission status: Accepted

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

for ai in a:
  ans += 1 / ai

print(1 / ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

print(1 / A_rev)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

    sum = 1/sum

    print(sum)

Submission status: Accepted

Solution code:
import sys
N = int(sys.stdin.readline())
a_inv = 0
for a in sys.stdin.readline().split():
  a_inv += 1/int(a)
print(1/a_inv)

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

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

print(1/ans)

Submission status: Accepted

Solution code:
from sys import stdin,stdout
I = lambda : map(int,stdin.readline().split())

n = input()
A = I()
med = 0.0
for i in A:
	med+=(1/float(i))
print 1/med

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1 / tmp)

Submission status: Accepted

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

print(1/sum(b))

Submission status: Accepted

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

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

print(1/sum)

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

print(1/count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    n = II()
    as_ = LI()
    ans = 0
    ans = sum([1/a for a in as_])
    print(1/ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
"""
 // Author : snape_here - Susanta Mukherjee

"""
from __future__ import division, print_function
import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip
else:
    _str = str
    str = lambda x=b"": x if type(x) is bytes else _str(x).encode()

    
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
from math import ceil,floor,log,sqrt,factorial,pow,pi
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *,threading



def ii(): return int(input())
def fi(): return float(input())
def si(): return input()
def mi(): return map(int,input().split())
def li(): return list(mi())

import math
 
def find_gcd(x, y): 
      
    while(y): 
        x, y = y, x % y 
      
    return x
 
def main():
 
    n=ii()
    l=li()
    a=0
    for i in range(n):
        a+=1/l[i]
    a=1/a 
    print(a)
    
# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

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

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0,2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        if self.buffer.tell():
            return self.buffer.read()
        return os.read(self._fd, os.fstat(self._fd).st_size)

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

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


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


sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
input = lambda: sys.stdin.readline().rstrip(b"\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(1/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()))
total = 0
for x in a:
    total += 1 / x
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())
l = [1 / float(i) for i in input().split()]
ans = 1 / sum(l)
print(ans)

Submission status: Accepted

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

print("{}".format(1/l_val))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())
# スペース区切りの整数の入力
a = list(map(int, input().split()))

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

result = 1 / inv_sum

print(str(result))

Submission status: Accepted

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

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

print(1 / num)

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:
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())
print(1/sum(map(lambda x: 1/int(x), input().split())))

Submission status: Accepted

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

Submission status: Accepted

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

inv_ans = 0.0
for A_i in A:
    inv_ans += 1/A_i
print(1/inv_ans)

Submission status: Accepted

Solution code:


def main():
	N = int(input())
	A = [int(f) for f in input().split()]
	
	counter = 0.0
	for a in A:
		counter += 1.0/a
	print(1.0 / counter)
	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import numpy as np

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()))
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(n):
  a[i] = int(a[i])

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

print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1/k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())  #数値入力 「N」だけの入力のとき
a=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
bunbo = 0

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

Submission status: Accepted

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


sita = 0
for i in A_list:
    sita += 1/i

print(1/sita)

Submission status: Accepted

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

ans = 0.0
b = 0.0

for i in range(n):
    b += 1.0/(a[i])

ans = 1.0/(b)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(1/sum_)

Submission status: Accepted

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

print(1/sum([1/i for i in line]))

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:
import sys
input = sys.stdin.readline

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

for value in a:
  a2 += 1/value

print(1/a2)

Submission status: Accepted

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

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

Submission status: Accepted

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

total = 0.0
for a in a_list:
    total += 1.0 / a

print(1.0 / total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1/temp)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

n=int( sys.stdin.readline().strip() )
a=[ int(x) for x in sys.stdin.readline().strip().split() ]

ans=0
for ai in a: ans+= ( 1.0 / ai )
#
print( "{:>.5e}".format(1.0/ans) )

Submission status: Accepted

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

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

ans = 1/abb

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
t_list = list(map(int,input().split()))
sum_ = 0
for one in t_list:
    sum_ += 1/one
print(1/sum_)

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
an = list(map(int, input().split()))

sum = 0

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

ans = 1/sum

print(ans)

Submission status: Accepted

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

tmp_res = 0.0
for a in As:
    tmp_res += 1/a

res = 1/tmp_res

print(res)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1 / tmp)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
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 II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

def main(): 
    N = II()
    a_li = LI()

    bunbo = 0
    for a in a_li:
        bunbo += (1/a)
    print(1/bunbo)


main()

Submission status: Accepted

Solution code:
# coding:utf-8
N = int(input())
A = list(map(int, input().split()))
calc = 0

for i in A:
    calc += 1 / i

calc = 1 / calc

print(calc)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''
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())
A = list(map(int,input().split()))

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

print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

print(1 / sum(a))

Submission status: Accepted

Solution code:
n = int(input())
ans = 0.0
nn = [int(ni) for ni in input().split()]
for i in range(n):
    ans += (1/float(nn[i]))

print(1/ans)

Submission status: Accepted

Solution code:
def B():
    N = int(input())
    As = list(map(int, input().split()))

    print(1/sum([1/x for x in As]))


if __name__ == '__main__':
    B()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import heapq, bisect
import math
import itertools

def main():
    num = int(input())
    data = list(map(int, input().split()))

    bunbo = 0
    bunshi = 1
    for i in range(num):
        data[i] = 1 / data[i]
    ans = 1 / sum(data)

    # ans = bunshi / bunshibo
    print(ans)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())
a = list(map(int, input().split()))
r = list(map(lambda x: 1.0 / float(x), a))
print(1.0 / sum(r))

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

for i in range(a):
  c.append(1/b[i])
  
print(1/sum(c))

Submission status: Accepted

Solution code:
n = int(input())

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

ans = 0

for a in A:
    ans += 1.0 / a

print("%.10f" % (1.0 / ans))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
up = 0
for i in A:
  up += 1 / i
print('%.10f' % (1 / up))

Submission status: Accepted

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

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

denom = 0
for Ai in A:
    denom += (molec // Ai)

print(molec / denom)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    a = list(map(float, input().split()))

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

    print(1/reverse_sum)

Submission status: Accepted

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

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

print(1.0/bunbo)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ansinv = 0

for a in A:
  ansinv += 1 / a

print(1 / ansinv)

Submission status: Accepted

Solution code:
N,*A=map(float,open(0).read().split())

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

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()] 
wa=0

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

Submission status: Accepted

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

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

print(1/result)

Submission status: Accepted

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

_ans = 0
for s in S:
  _ans += (1 / s)

print(1 / _ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import decimal,math
from collections import Counter,defaultdict
from fractions import gcd
from bisect import bisect_right,bisect_left
decimal.getcontext().prec = 10
N=int(raw_input())

arr=map(int,raw_input().split())
ans=1
for i in arr:
	ans=ans*i
ans1=0
for i in arr:
	ans1=ans1+(ans)/float(i)
print ans/float(ans1)

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
input=sys.stdin.readline

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
A_list = list(map(int, input().split()))
sum = 0

for i in A_list:
  sum += 1/i
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:
def getlist():
	return list(map(int, input().split()))

N = int(input())
A = getlist()

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

print(1 / s)

Submission status: Accepted

Solution code:
import sys
mod = 1000000007
def get_array(): return list(map(int, sys.stdin.readline().split()))
def get_ints(): return map(int, sys.stdin.readline().split())
def input(): return sys.stdin.readline()
def main():
    n = int(input())
    a = get_array()
    m = 1
    for e in a: m *= e
    s = 0
    for e in a: s  += m // e
    print(m/s)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for x in a:
  bunbo += 1/x
  
print(1/bunbo)

Submission status: Accepted

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

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

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

print(1/tmp_sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
t=0
for i in input().split():
	i=int(i)
	t+=(1.0/i)
print(1.0/t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
'''
date +%Y.%m.%d

题解先咕着。
'''
def intinput():
    return [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
n = int(input())
li = list(map(int,input().split()))
gyaku = sum([1/_ for _ in li])
print(1/gyaku)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
a = na()

s = 0
for i in range(n):
    s += 1/a[i]
print("{:.14f}".format(1/s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#print(A)

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

Submission status: Accepted

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

ans = 0
for a in A:
    ans += 1.0/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())
As = list(map(int, input().split()))

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

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

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

ans = 0

for Ai in A:
    ans += 1/Ai

ans = 1 / ans

print(ans)

Submission status: Accepted

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

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

denom = multiple
numer = 0
for a in A:
    numer += denom // a
    
print(denom / numer)

Submission status: Accepted

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



print(1/result)

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)