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


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

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:
#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    result = 0
    for i in range(N):
        result += 1 / A[i]

    if N == 1:
        print(A[0])
    else:
        print(float(1 / result))

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

Submission status: Accepted

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

N = int(input())
An = list(map(int,input().split()))
arcAn = list(map(convert_Arc,An))
sum = 0
for i in range(N):
  sum += arcAn[i]
Arc_sum = convert_Arc(sum)
print(Arc_sum)

Submission status: Accepted

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

ans = 0
bunbo=0

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

ans = 1/(bunbo)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, A: "List[int]"):
    print(1.0/sum(map(lambda x:1.0/x, A)))
    return


# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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())
L = list(map(int, input().split()))

M = 0

for i in range(0,N):
  M += 1/(L[i])
  
print(1/M)

Submission status: Accepted

Solution code:
n = int(input())
A = [int(x) for x in raw_input().split(' ')]
B = [1.0/ x for x in A]
res = 1.0 / sum(B)
print(res)

Submission status: Accepted

Solution code:
# ABC138b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

Submission status: Accepted

Solution code:
print(1/sum(list(map(lambda x:1/int(x), open(0).read().split()[1:]))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(1/sum)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000)

def intinput(): return map(int,input().split())

n = int(input())
t = map(lambda x:1/int(x),input().split())
print(1/sum(t))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0

for i in list(map(int,input().split())):
    ans += i**(-1)

print(ans**(-1))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1 / gyk1)

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

Submission status: Accepted

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

print(1/sum(A))

Submission status: Accepted

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

Submission status: Accepted

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

s_1 = 0

for a in A:
    s_1 += 1/a

print(1/s_1)

Submission status: Accepted

Solution code:
import numpy as np
from fractions import gcd
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

n = int(input())

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

devisor = gcd_list(a)

a = np.array(a) / devisor
child = a.prod()
child *= devisor

mother = 0

for m in range(n):
    mother += np.delete(a, m).prod()

x = child / mother

print(x)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

den = 0
for a in A:
  den += mul / a

ans = mul / den
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
ans = 1 / ans
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = input()
number = 0
AList = A.split(" ")
for num in AList:
    number = number + 1/int(num)
number = 1/number
print(number)

Submission status: Accepted

Solution code:
n=int(input())
a=[int(_) for _ in input().split()]
res = 0
if len(a)==n and all(1<=i<=1000 for i in a):
    for j in range(len(a)):
        res += 1/a[j]
    print(1/res)
else:
    print('hoge!')

Submission status: Accepted

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

for i in a:
    b.append(1/i)

print(1/sum(b))

Submission status: Accepted

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

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

Submission status: Accepted

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

rev = 0

for i in A:
  rev += 1/i

print(1/rev)

Submission status: Accepted

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

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

sumA = 0

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

print(1/sumA)

Submission status: Accepted

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

reverse = 0

for i in a:
    reverse += (1/i)

print(1/reverse)

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]
    i+=1
S=sum(B)
print(1/S)

Submission status: Accepted

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

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:
#abc138b
from operator import mul
from functools import reduce

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

numerator = reduce(mul, list_A)
denominator = 0

for i in range(N):
    denominator+=numerator/list_A[i]
    
print(numerator/denominator)

Submission status: Accepted

Solution code:
#AtCoder

import sys
import math
import itertools

N = int(input())
A = list(map(int, input().split()))
all = 1
for n in range(N):
	all = all*A[n]

sum = 0
for n in range(N):
	sum += all/A[n]

print(all/sum)


"""

"""

Submission status: Accepted

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

print(1 / (sum(1 / i for i in li_a)))

Submission status: Accepted

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

suminv = 0

for a in A:
    inv = 1/a
    suminv += inv

print(1/suminv)

Submission status: Accepted

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

ans = 1/ans_R

print(ans)

Submission status: Accepted

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

answer = 0.0
for d in a:
  answer += 1/d

print(1/answer)

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
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# 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)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  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)]
"""

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

sum = 0

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

print(1/sum)

Submission status: Accepted

Solution code:
N=int(input())
R=input().split(" ")
S=0
for r in R:
    S+=1/int(r)

print(1/S)

Submission status: Accepted

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

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

Submission status: Accepted

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

cal=0

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

print(1/cal)

Submission status: Accepted

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

S = 0

for n in nums:
  S += 1/n
print(1/S)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1/m)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

denom = 0

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

ans = 1 / denom

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

total = 0
for it in s:
  total += 1/it
print(1/total)

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()))
x = []
for i in range(n):

    x.append(1 / a[i])

z = sum(x)
print(str(1 / z))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(x) for x in 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()));sum = 0
for i in a:
    sum += 1/i
print(1/sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 1 / denominator
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
A = map(int, input().split())
ans = 0.0
for a in A:
  ans += (1.0/float(a))
print(1.0/ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(1/k)

Submission status: Accepted

Solution code:
N = int(input())
A = [a for a in map(int, input().split(" "))]
B = 1
for a in A:
    B *= a
q = 0
for a in A:
    q += B//a
print(B/q)

Submission status: Accepted

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

answer = 0

for i in range(N):
    answer += 1 / a[i]

print(1/answer)

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


inv_sum = sum([(1/ai) for ai in a])
print((1 / inv_sum))

Submission status: Accepted

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

sums=0

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

Submission status: Accepted

Solution code:
import sys
lst = []
for line in sys.stdin:
    if line == '\n':
        break
    else :
        lst.append(line)

n = int(lst[0])
intList = lst[1].split(' ')
mother = 0
for item in intList:
    mother = mother + (1/int(item))
print(1/mother)

Submission status: Accepted

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

Submission status: Accepted

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

res = 0

for a in A_list:
    res += 1/a

print(1/res)

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:
def main():
    n=int(input())
    a=list(map(int,input().split(' ')))
    res = 0
    for i in a:
        res += 1/i
    ans = 1/res
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

print(1.0 / sum(1.0 / a for a in al))

Submission status: Accepted

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

sum = 0

for x in A:
	sum+= 1 / x

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

Submission status: Accepted

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

res = 0

for a in map(int, input().split()):
    res += 1 / a

print(1 / res)

Submission status: Accepted

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

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

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

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

print(b/bunbo)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=list(map(int, input().split()))
top = 1
item = 1
below = []
belows = 0
for i in a:
  top *= i
for num in range(len(a)):
  for _, j in enumerate(a):
    if _ != num:
    	item *= j
  below.append(item)
  item = 1
for b in below:
  belows += b
ans = top/belows
print(ans)

Submission status: Accepted

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

total = sum(1.0 / a for a in A)

print(1.0 / total)

Submission status: Accepted

Solution code:
N = int(input())
r=[]

I=(input())
r=I.split()



from fractions import Fraction
def inverse(f):
    
    return 1/f 

T=sum(inverse(int(i)) for i in r)
Ans=inverse(T)
print(Ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    N = int(input())
    A = list(map(int,input().split()))
    ans = 0
    for i in range(N):
        ans += 1/A[i]
    print(1/ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = input()
alist = input().split()
#blist = []
sum = 0

for a in alist:
	#blist.append(int(a))
	sum += 1/int(a)

print(1/sum)

Submission status: Accepted

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

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]

ans = 1 / sum(A)

print(ans)

Submission status: Accepted

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

bunbo = 0
answer = 0

for p in list_a:
    bunbo += 1/p

answer = 1 / bunbo

print(answer)

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

den = 0

for a in A:
    den += 1. / a

print(1 / den)

Submission status: Accepted

Solution code:
N = int(input())
A = list(map(int, input().split()))
B = [[]]*N

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

ans = 1/sum(B)
print("{:.16f}".format(ans))

Submission status: Accepted

Solution code:
N = int(input())
Ai_list=[]
Ai_product=1
Ai_sum=0

for Ai in input().split(' '):
  Ai = int(Ai)
  Ai_product *= Ai
  Ai_list.append(Ai)
  
for Ai in Ai_list:
  Ai_sum += Ai_product/Ai
  
print(Ai_product/Ai_sum)

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:
num = int(input())
vals = [int(i) for i in input().split()]
total = 0
for item in vals:
	total+=(1/item)
print(1/total)

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:
def main():
  n = int(input())
  array = map(int,input().split())


  sum = 0

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

main()

Submission status: Accepted

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

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

print(1 / inv_ans)

Submission status: Accepted

Solution code:
# coding: utf-8
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:
from sys import exit, stderr, stdin
input = stdin.readline
# setrecursionlimit(10**7)

def debug(var, name="hoge"):
    print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)
    return


def main():
    N = int(input())
    a = list(map(int,input().split()))
    p = [a[0]]
    for i in range(1, N):
        p.append(p[i-1]*a[i])
    ans = p[-1]/sum([p[-1]/a[i] for i in range(N)])
    print(ans)
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input()) #this is not really needed in Python
A=map(int,input().split())
print('{:.16f}'.format(1/sum(1/x for x in A)))

Submission status: Accepted

Solution code:
from sys import stdin
 
N = int(stdin.readline().rstrip())
A = input().split()
bunbo=0.0
bunsi=1.0

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

print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = [int(i) for i in input().split()]
x,y = 1.0,0
for i in a: x*=i
for i in a: y+=x//i
print(x/y)

Submission status: Accepted

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

bunbo =  0

for i in Alist:
    bunbo += Fraction(1, i)

ans = Fraction(1, bunbo)

print(float(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())
A = list(map(int, input().split()))
a = [0] * N
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()]
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()))


x = 0

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

print(1/x)

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

r = 0
for n in a:
    r += (1 / n)
    
print(1 / r)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())

str_list = input().split(' ')
A = [int(x) for x in str_list]
A = np.array(A)
total = A.sum()
prod = A.prod()
#print( prod/( (prod/A).sum() ) )
print( 1.0/np.sum(1.0/A) )

Submission status: Accepted

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

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

print(1/sum)

Submission status: Accepted

Solution code:
n = int(input())

print(1 / sum(1 / int(i) for i in input().split()))

Submission status: Accepted

Solution code:
N = int(raw_input())
Num_Array = map(int,raw_input().split())

counter = 0
total = float(0)
while counter < N:
  total += 1.0 / float(Num_Array[counter])
  counter += 1
total = 1.0/total
print total

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
numbers = list(map(int, input().strip().split()))

num = 1
den = numbers[0]
for i in range(1, len(numbers)):
	num = (num * numbers[i]) + den
	den = den * numbers[i]

print(den / num)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
#-------------------------------------
n = int(input())
a = list(map(int,input().split()))
ans = 0
for v in a:
    ans += 1/v

print(1/ans)

Submission status: Accepted

Solution code:

if __name__ == '__main__':
    num = int(input())
    numeros = list(map(int,input().split()))
    denominador = 0
    for i in numeros:
        denominador += (1/i)
    print(1/denominador)

Submission status: Accepted

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

result = 0.0
for val in a_L:
    result = result + 1/float(val)
result = 1/result

print(result)

Submission status: Accepted

Solution code:
input() # N; >0
resistances = [int(a) for a in input().split()]
print(1/sum(1/resistance for resistance in resistances))

Submission status: Accepted

Solution code:
_ = input()
a = input().split()
def func(n):
    return 1 / n
print(func(sum(map(func, list(map(int, a))))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
S = list(map(float,input().split()))
ans_t = 0

for i in S:
	ans = 1/i
	#print(ans)
	ans_t = ans + ans_t

ans_t=1/ans_t
print(ans_t)

Submission status: Accepted

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

souwa = 0
for i in range(num):
  souwa += 1/number[i]

print(1/souwa)

Submission status: Accepted

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

for i in a:
    sum += total/i
ans = total/sum
print(ans)