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:
def LI():
  return [int(s) for s in input().split()]

N = int(input())
A_s = LI()
 
total = 0
for a in A_s:
  total+=(1/a)
  
print(1/total)

Submission status: Accepted

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

Submission status: Accepted

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

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();print(1/sum(1/int(i) for i in input().split()))

Submission status: Accepted

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

Submission status: Accepted

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

    sum = 0
    tmp = 0

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

    
    result = 1 / tmp

    print(result)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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])
print(1/sum)

Submission status: Accepted

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

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(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()))
print(1/sum([1/A[i] for i in range(N)]))

Submission status: Accepted

Solution code:
from fractions import Fraction


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

total = Fraction(0, 1)
for a in a_list:
    total = total + Fraction(1, a)

print(total.denominator / total.numerator)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
A = list(map(int, 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 = [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 = 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())
A = list(map(int, input().split()))
Re_sum = 0

for g in range(N):
    Re_sum += (1 / A[g])

print(1 / Re_sum)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

print(1/c)

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

N=II()
DS=LI()

res = 0.0
for n in DS:
    res += 1/n

print(1/res)

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

ans=0

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

print(1/ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    
    res = 0.0
    for i in a:
        res += (1/i)
    print(1/res)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, *A = map(int, read().split())
Aarr = np.array(A)
At = 1 / Aarr
print(1 / sum(At))

Submission status: Accepted

Solution code:
N = int(input())
A = (int(s) for s in input().split(' '))

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

ans = 1/denom
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:
from fractions import Fraction

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

asum = 0
for i in a:
  asum += Fraction(1, i)

print(float(1/asum))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
li = [int(i) for i in input().split()]
suma = 0
sum = 0
for i in range(N) :
    suma += 1/li[i]
sum = 1 / suma
print(sum)

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

sum_rec = 0

for i in range(len(a)):
    sum_rec += np.reciprocal(float(a[i]))

print(np.reciprocal(sum_rec))

Submission status: Accepted

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

denominator = 0

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
a = [1/i for i in map(int,input().split())]
dv = sum(a)
print("%.10f"%(1.0/dv))

Submission status: Accepted

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

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:
import numpy as np

n = int(input())
a = np.array([int(x) for x in input().split()])
print(1/sum(1/a))

Submission status: Accepted

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

aa = list(map(lambda t: 1/t, a))
print(1/sum(aa))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 
import numpy as np
N = int(input())
A = np.array(input().split(),np.int32)
 
answer = 1/(1/A).sum()
print(answer)

Submission status: Accepted

Solution code:
t = int(input())

ans = 0.0
num = input().split(" ")
num = [int(i) for i in num]
for i in num:
  ans += 1.0/i
print(1/ans)

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:
def main():
    N = int(input())
    A = list(map(int, input().split(" ")))
    result = 0
    for a in A:
        result += 1 / a
    print(1 / result)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(1/s)

Submission status: Accepted

Solution code:
N = input()
R = 0
for s in input().split():
    R += 1/int(s)
print(1/R)

Submission status: Accepted

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

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())
print(1 / sum([1/int(_) for _ in input().split()]))

Submission status: Accepted

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

	n_r = list(map(re,a))

	print(1/sum(n_r))

 
if __name__ == '__main__':
	main()

Submission status: Accepted

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

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

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

suma = 0

for a in A:
    suma += 1/a

print(1/suma)

Submission status: Accepted

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

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 = list(map(int, input().split()))
print(1/sum([1/i for i in a_list]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# Resistors in Parallel
import numpy as np

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

# solve
res = 1 / np.sum(1 / A)

# output
print(res)

Submission status: Accepted

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

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())
a = list(map(int,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()))

re_total=0

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

print(1/re_total)

Submission status: Accepted

Solution code:
N=int(input().strip())
A = list(map(int, input().strip().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()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int, A: "List[int]"):
    b = 1
    def mul(x: "List"):
        r = 1
        for i in x:
            r *= i

        return r
    
    u = 0
    for i in range(N):
        t = [A[j] for j in range(N) if j != i] 
        u += mul(t)

    print(mul(A)/u)
    return



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

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 += (1 / A[i])

print(1/S)

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())
a = np.array([int(i) for i in input().split()])

print(1 / sum(1 / a))

Submission status: Accepted

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

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

bunsi=product
bunbo=0

for a in A:
    bunbo+=product/a
print(bunsi/bunbo)

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

Submission status: Accepted

Solution code:
from fractions import Fraction

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

sum = 0
for i in range(len(A)):
    a = Fraction(1, A[i])
    sum += a
sum = Fraction(sum.denominator, sum.numerator)

print(float(sum))

Submission status: Accepted

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

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

print(1/s)

Submission status: Accepted

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

print(1/ans)

Submission status: Accepted

Solution code:
import numpy as np

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

lst = np.array(A)
lst = 1 / lst
print(1/lst.sum())

Submission status: Accepted

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

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:
from sys import stdin

n = int(stdin.readline().rstrip())
arr = [int(x) for x in stdin.readline().rstrip().split()]

under = 0
for i in arr:
    under += 1/i

print(1/under)

Submission status: Accepted

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

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

Submission status: Accepted

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

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()))
tmp = 1

for i in range(n):
    tmp *= a[i]

lst = []

for i in range(n):
    lst.append(tmp//a[i])

print(tmp/sum(lst))

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:
def main(n: int, a: list):
    l = 0
    for _a in a:
        l += 1 / _a

    print(1 / l)


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

    main(n, a)

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:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    ans=0
    for a in map(int,input().split()):
        ans+=1/a
    print(1/ans)
resolve()

Submission status: Accepted

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

res = 0
for Ai in A:
  res += 1/Ai

print(1/res)

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

denominator = 0

for a in A:
  denominator += 1/a

print(1/denominator)

Submission status: Accepted

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

Submission status: Accepted

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

for i in num:
  res += 1/i
  
print("{:.16}".format(1/res))

Submission status: Accepted

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

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

Submission status: Accepted

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

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 = [int(i) for i in input().split()]
ans = 0.0
for a in A:
    ans += 1.0 / a
ans = 1.0 / ans
print("{}".format(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(1.0 / R)

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    n = int(input())
    a_tuple = tuple(map(int, input().split()))
    print(1 / sum([1 / a for a in a_tuple]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from functools import reduce
def input(): return sys.stdin.readline().rstrip()

def main():
    n = int(input())
    a_tuple = tuple(map(int, input().split()))
    a_mul = reduce(lambda a, b: a*b, a_tuple)
    print(a_mul / sum([a_mul / a for a in a_tuple]))

if __name__ == '__main__':
    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:
import sys

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

ans = 1/(denom)
print(ans)

Submission status: Accepted

Solution code:
def gyaku(n) :
	return 1 / int(n)
N = int(input())
A = list(map(gyaku, input().split()))
print(1/ sum(A))

Submission status: Accepted

Solution code:
N, *L,  = [list(map(int, s.split())) for s in open(0)]
N, L = N[0], L[0]
nums = []
for i in range(N):
    nums.append(1/L[i])
print(1/sum(nums))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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 = input()
numbers = list(map(int, input().split()))
print(1 / sum(1 / x for x in numbers))

Submission status: Accepted

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

cnt = 0
for i in L:
    cnt += 1 / i

print(1 / cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

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

Submission status: Accepted

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

ans = 0
for i in range(n) :
  ans += a[i]**(-1)
  
ans = ans**(-1)

print(ans)

Submission status: Accepted

Solution code:
# 22:42
import numpy as np
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()))
b=0
for i in range(n):
  b+=1/A[i]

print(1/b)

Submission status: Accepted

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

divided_nums = [1/i for i in numbers]

output = 1 / (sum(divided_nums))

print(output)

Submission status: Accepted

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

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

ans = 1 / wrk

print(ans)

Submission status: Accepted

Solution code:
import sys, os
import collections

MOD = 10 ** 9 + 7

def solve(input_stream):
  N = read_int(input_stream)
  numbers = read_ints(input_stream)
  ans = 1.0
  mother = 0
  for value in numbers:
    mother += 1.0/value
  
  return [str(ans/mother)]


def read_ints(input_stream):
  return [i for i in map(int, input_stream.readline().strip().split())]

def read_int(input_stream):
  return int(input_stream.readline().strip())


if __name__ == "__main__":
    outputs = solve(sys.stdin)
    for line in outputs:
      print(line)

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

d = sum([1.0 / a for a in A])
ans = 1.0 / d
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
A = list(map(float, 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()))

ans = 0

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

ans = 1 / ans 

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def MAP(): return [int(s) for s in input().split()]

N = int(input())
A = MAP()

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

print(1/souwa)

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 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()))
fact = 1
for i in range(n):
  fact *= a[i]
bunbo = 0
for i in range(n):
  bunbo += fact // a[i]
print(fact/bunbo)

Submission status: Accepted

Solution code:
def inv(x):
    return 1 / x


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

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

print(inv(sum))

Submission status: Accepted

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

print(sum(list(map(lambda x : x**-1 , A_list)))**-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=input()
s=input().split()

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

print(1/sum)

Submission status: Accepted

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

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

print(1/a)

Submission status: Accepted

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

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

ans = 1/sum
print(ans)

Submission status: Accepted

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

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

rev_sum = 0
for x in i: 
  rev = 1/x
  rev_sum += rev
  ans = 1/rev_sum

print(float(ans))

Submission status: Accepted

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

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

print(1/sum)

Submission status: Accepted

Solution code:
import sys

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

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

print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

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

Bunbo_sum = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum_of_rev = 0.0

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

print(1 / sum_of_rev)

Submission status: Accepted

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

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

total = input()
l = list(map(int, input().split()))

f = 0.0

for i in range(int(total)):
    f += 1/l[i]

print(1/f)

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

Submission status: Accepted

Solution code:
n = int(input())

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

ans = 0

for i in range(n):
	ans = ans + a[i]**-1
	
print(ans**-1)

Submission status: Accepted

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

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]
ans = 1/s
print(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)