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()))
asn = 0
for i in A:
    asn += float(1/i)
asn = 1/asn
print(asn)

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

print(1 / ans)

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, input().split()))
up = 0
down = 1
for ai in a:
    down *= ai

for i in range(n)[::-1]:
    # print(i)
    mul = 1
    for j in range(n-1):
        mul *= a[i-j]
    up += mul
    # print(up)

ans = down / up
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
number = input().split(" ")
total= 1
y = 0
for i,a in enumerate(number):
    total *= int(a)
    x = 1
    for j,b in enumerate(number):
        if i == j:
            x *= 1
        else:
            x *= int(b)
    y += x
print(total/y)

Submission status: Accepted

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

Submission status: Accepted

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

for count in range(N):
    ans1 = ans1 + 1/A[count]
print(1/ans1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
#a,b= map(int,input().split())
N=int(input())
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
li0= [int(x) for x in input().split()]
sum=i=0
for i in range(len(li0)):
  sum+=1/li0[i]
print(1/sum)

Submission status: Accepted

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

inverse_A = []

for a in A:
    recip_a = 1 / a
    inverse_A.append(recip_a)

sum_invA = sum(inverse_A)

ans = 1 / sum_invA

print(ans)

Submission status: Accepted

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

b=[]
for i in a:
    b.append(1.0/i)

print(1.0/sum(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
n = int(input())
a = list(map(int, input().split()))
prd_tot = reduce(lambda x,y:x*y, a)
deno = sum([prd_tot / ai for ai in a])
print(prd_tot / deno)

Submission status: Accepted

Solution code:
from sys import stdin

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

print(1/sum(a))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1/ans)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

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

Submission status: Accepted

Solution code:
_ = input()
A = tuple(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()))
sum_ = 0
for ai in a:
    sum_ += 1 / ai
print(1 / sum_)

Submission status: Accepted

Solution code:
#import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    n = int(input())
    a = list(map(int,ipti().split()))
    under = 0

    for ele in a:
        under += 1 / ele

    print(1/under)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(1/sum(arr))

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

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

print(1/output)

Submission status: Accepted

Solution code:
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().strip())
    AList = list(map(int, sys.stdin.readline().split()))

    s = [1/a for a in AList]
    print(1/sum(s))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0

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

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

print(ans)

Submission status: Accepted

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

print(1/x)

Submission status: Accepted

Solution code:
# abc138 b

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c = 0

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

print(float(1/c))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

time = 1
for i in a:
    time *= i
sums = 0
for j in a:
    sums += time/j
print(time/sums)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
A = [int(x) for x in input().split()]

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

print(1/r_ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
  input()
  print(1 / sum( [1/A for A in map(int, input().strip().split())] ))

if __name__=='__main__':
  main()

Submission status: Accepted

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

print(1/t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from decimal import Decimal
n = int(input())
a = tuple(map(Decimal,input().split()))
result = Decimal(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()))

sum = 0

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

Submission status: Accepted

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

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=list(map(int, input().split()))
a=np.array(a)
s=np.sum(1/a)
print(1/s)

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = np.array(list(map(float, input().split())))
a_re = np.reciprocal(a)
ans = 1 / np.sum(a_re)

print(ans)

Submission status: Accepted

Solution code:
#python3
def f(x):
    if x != 0:
        return 1/x
    else:
        return

def main():
    n = int(input())
    s = f(sum([f(int(i)) for i in input().split()]))
    print("{0:.14f}".format(s)) 
main()

Submission status: Accepted

Solution code:
int(input())
a = list(map(int, input().split()))
print("{:.10f}".format(1/sum(list(map(lambda x: 1/x, a)))))

Submission status: Accepted

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

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

print(1/sum)

Submission status: Accepted

Solution code:
import sys

n, *A = map(int, sys.stdin.read().split())

def main():
    prod = 1
    for a in A:
        prod *= a
    
    numerator = prod
    denominator = 0
    for a in A:
        denominator += prod // a
    
    return numerator / denominator

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

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

sum = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(float, 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 / sum(map(lambda x: 1 / x, A))
print(ans)

Submission status: Accepted

Solution code:
def makelist(n, m):
    return [[0 for i in range(m)] for j in range(n)]

N = int(input())
A = list(map(int, input().split()))
hoge = 0
for e in A:
    hoge += 1 / e
print(1/hoge)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def readints():
    return list(map(int, input().split()))


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

Submission status: Accepted

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

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:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc138/tasks/abc138_b

n = int(input())
a = [int(x) for x 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()))

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

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,a=open(0)
print(1/sum(1/int(i)for i in a.split()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1/denomi)

Submission status: Accepted

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

# 最小公倍数 lcm (least common maltiple)
# lcm(a,b) = a * b / gcd(a,b)

from fractions import gcd
from functools import reduce

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

def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

lcm = lcm_list(A)
#print(lcm)

# 分子
numerator = lcm

# 分母
denominator = 0
for i in range(N):
  denominator += lcm // A[i]

ans = numerator / denominator
print(ans)

Submission status: Accepted

Solution code:
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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
A = LIST()

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

print(1/s)

Submission status: Accepted

Solution code:
import sys

n = int(input())
a = map(int, input().split())
x = 1.0 / sum(1 / x for x in a)
print(x)

Submission status: Accepted

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

print("{:.10f}".format(ans))

Submission status: Accepted

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

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

Submission status: Accepted

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

sum_num = 0

for i in A:
    sum_num += 1 / i

print(1/sum_num)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

for i in range(len(a)):
    a[i] = 1/a[i]

print(1/sum(a))

Submission status: Accepted

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

for a in al:
    a_inv += 1/a

print(1/a_inv)

Submission status: Accepted

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

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:
from functools import reduce
N = int(input())
*A, = map(int, input().split())

a = reduce(lambda x,y:x*y, A)
b = sum(map(lambda x:a//x,A))
print(a/b)

Submission status: Accepted

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

acc = 0.0
for a in A:
    acc += 1 / a

print(1 / acc)

Submission status: Accepted

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

reverse_list = []
for a in al:
    reverse_list.append(1/a)

print(1/sum(reverse_list))

Submission status: Accepted

Solution code:
import numpy as np

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

reverse_list = []
for a in al:
    reverse_list.append(1/a)

print(1/sum(reverse_list))

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

Submission status: Accepted

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

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:
N = int(input())
a = map(int, input().split())
b = []
for i in a:
    b.append(1/i)
c = sum(b)
result = 1 / c
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(1/ans)

Submission status: Accepted

Solution code:
n = int(input())
a = [int(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=map(int,input().split())
s=sum(1/i for i in A)
t=1/s
print(t)

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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def solve(inp):
    N = int(inp.readline().strip())
    A = list(map(int, inp.readline().strip().split(' ')))
    s = 0
    for a in A:
        s += 1 / a
    return str(1 / s)


def main():
    import sys
    result = solve(sys.stdin)
    if result is not None and result != '':
        print(result)


if __name__ == '__main__':
    main()

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 = 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()))
p = 1
s = 0
for i in a:
    p *= i
for i in a:
    s += p/i
print(p/s)

Submission status: Accepted

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

# 各項の逆数の和を取る
sm=0
for x in l:
  sm+=1/x
  
# 和の逆数を出力
print(1/sm)

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(float,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()))
c=0.0
for x in a:
    c+=1/x
print(1/c)

Submission status: Accepted

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

Submission status: Accepted

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

sum=0
result=0

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

result=1/sum
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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]+ b

print(1/b)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(x) for x in 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=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()))

s=0
for x in a:
    s+=1/x
ans=1/s

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(float(1 / bunbo))

Submission status: Accepted

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

lstSub = list()
for i in range(len(lstMain)):
    lstSub.append(float(1/lstMain[i]))

print(str(1/sum(lstSub)))

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

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
import numpy
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())
An = list(map(int, input().split()))

answer = 1 / sum(1/x for x in An)
print(answer)

Submission status: Accepted

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

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

print(1/sum)

Submission status: Accepted

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

bumbo = 0

for i in A:
  bumbo += (1 / i)

print(1/bumbo)

Submission status: Accepted

Solution code:
n = int(input())
an = [int(i) for i in input().split()]
denominator = 0
for ai in an:
    denominator += 1 / ai
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 = map(int, input().split())
print(1 / sum(map(lambda x: 1 / x, A)))

Submission status: Accepted

Solution code:
import math

N=int(input())
A=list(map(int,input().split()))
product=1
sum=0
for i in range(N):
    product=product*A[i]

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

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

Submission status: Accepted

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

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

print(1 / sum_inverse)

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

S = 0
for j in A:
  S += 1/j
print(1/S)

Submission status: Accepted

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

denomi = 0
for ai in a:
    denomi += 1/ai

print(1 / denomi)

Submission status: Accepted

Solution code:
a = int(input())
lia = list(map(float, input().split()))
sum_under = 0

for i in lia:
  sum_under += 1/i
  
print(1/sum_under)

Submission status: Accepted

Solution code:
n=int(input())
a=input().split()
rev=0

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

print(1/rev)

Submission status: Accepted

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

calc = 0
for i in range(n):
  calc += 1/aList[i]

print(1/calc)

Submission status: Accepted

Solution code:
n = int(input())

A = list(map(int, input().split()))
B = [1 / A[i] for i in range(n)]
S = sum(B)

print(1 / S)

Submission status: Accepted

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

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