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 = 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())
S = list(map(int,input().split(" ")))
num_list=[]
for num in S:
  num_list.append(1/num)
total_num = sum(num_list)
last_num = 1/total_num

print(last_num)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def main():
    n = int(input())
    num = makeNumList(input())
    ans = 0.0
    
    for i in range(n):
        ans += invNum(num[i])
    
    print(invNum(ans))

def invNum(n):
    return 1 / n

def makeNumList(raw):
    num = []
    raw = raw.split(" ")
    for i in range(len(raw)):
        num.append(int(raw[i]))
    return num

main()

Submission status: Accepted

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

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

print(1/sum)

Submission status: Accepted

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

frac = 0

for i in N : 
    frac += 1/i
    
print(1/frac)

Submission status: Accepted

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

Submission status: Accepted

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

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_lst = [1/int(elem) for elem in input().split()]

print(1/sum(a_lst))

Submission status: Accepted

Solution code:
import numpy as np

def main():
    inputs = [input() for _ in range(2)]
    numbers = np.array([float(i) for i in inputs[1].split(' ')])
    numbers = np.reciprocal(numbers)
    answer = 1 / sum(numbers)
    print(answer)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
nums = list(map(int, input().split()))
mul_r = 1
for num in nums:
  mul_r *= num
ans = []
for num in nums:
  ans.append(mul_r//num)
print(mul_r/sum(ans))

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

result=0

for i in A:
    result+=1/i

print(1/result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

den = 0

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

Submission status: Accepted

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

den=0
for i in range(n):
	temp=1
	for j in range(n):
		if(j!=i):
			temp*=arr[j]
	den+=temp
print(num/den)

Submission status: Accepted

Solution code:
def solve(string):
    n, *a = map(int, string.split())
    return str(1 / sum(1 / _a for _a in a))


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
An_list = input().split()

An = np.array(An_list, dtype = "float" )
result = 1 / np.sum(np.reciprocal(An))
print(result)

Submission status: Accepted

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

sum = 0.0
for i in num:
  sum += 1/i
  
print(1/sum)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in map(int,input().split()):
  ans += 1/i
print('{:.6f}'.format(1/ans))

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:

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    n = ii()
    a = li()
    bunshi = 1
    bunbo = 0
    for i in a:
        bunshi *= i
    for i in a:
        bunbo += bunshi / i
    
    print(bunshi/bunbo)


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:
def resistors():
    N = int(input())
    b = map(int, input().split())
    result = 0

    for i in b:
        result = result + (1 / i)

    print(1/result)
    
resistors()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from fractions import Fraction as F

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

value = F(1, sum(F(1, a) for a in A))
print(float(value))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#ACB138 B1

N= int(input())

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

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

ans = 1/sum(div)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

n = p
d = sum([p // a for a in A])

ans = n / d
print(ans)

Submission status: Accepted

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

print(1 / res)

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())
l=list(map(int,input().split()))
alpr,sd=1,0
for i in l:
  alpr*=i
for i in l:
  sd+=(alpr//i)
print(alpr/sd)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def calc(N, A):
    return 1 / sum([1 / a for a in A])


N = int(input())
A = [int(s) for s in input().split(' ')]
print(calc(N, A))

Submission status: Accepted

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

output = 1/out

print(output)

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

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

Submission status: Accepted

Solution code:
import sys
from collections import deque

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    N = int(inputs[0])
    A = string_to_int(inputs[1])
    sum_under = 0
    for i in A:
        sum_under += 1/i
    return 1/sum_under


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(2))
    print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = map(int,input().split())
x =0
for a in A:
  x+=1/a
x=1/x
print("{}".format(x))

Submission status: Accepted

Solution code:
n = int(input())
a = [int(ai) for ai in 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 = map(int, input().split())
def divide(num):
    return 1 / num
recip = map(divide, A)
print(1 / sum(recip))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

sum_mom = 0

for i in A:
    sum_mom += 1 / i

ans = 1 / sum_mom
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

mult=1
num=0


for i in range(n):
    mult*=s[i]
    
for j in range(n):
    num+=mult/s[j]
    
print(mult/num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0.0

for x in a:
    ans += 1.0 / x

print(1.0 / ans)

Submission status: Accepted

Solution code:
from operator import mul
from functools import reduce


N = int(input())
if N == 1:
    ans = int(input())
    print(ans)
    exit()
lst_A = list(map(int, input().split()))


upper = reduce(mul, lst_A)
lower = 0
for i in range(N):
    lst_tmp = lst_A[:i] + lst_A[i+1::]
    lower += reduce(mul, lst_tmp)
ans = upper / lower
print(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())
mylist = list(input().split())

myans = 0

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

Submission status: Accepted

Solution code:
#abc138b

n=int(raw_input())
a=map(int,raw_input().split())
s=0.0
for i in xrange(n):
 s+=1.0/a[i]
print 1.0/s

Submission status: Accepted

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

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 = input()
ints = input().split()
sep = float(0.0)
for i in ints:
    sep += (1/int(i))
print(1/sep)

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

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

Submission status: Accepted

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

d=1
m=0
for i in a:
  d *= i
for i in a:
  m += d/i

ans = d/m

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

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

res = 0
for i in aiueo:
    res += 1/i

print(1/res)

Submission status: Accepted

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

Submission status: Accepted

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

a_sum = 0
for i in a:
	a_sum+= 1/i
print("%f" % (1/a_sum))

Submission status: Accepted

Solution code:
import sys
length = int(input())
sum = 0.0
input_str = input().split(" ")
for  i in range(0, length):
  sum += (1/(int(input_str[i])));

sum = (1/sum)
print(sum);

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x=int(input())
z=0
for x in map(int,input().split()):
    z+=1/x
print(1/z)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
arr=list(map(int,input().split()))
sums=0
for val in arr:
  sums+=1.0/val
print(1.0/sums)

Submission status: Accepted

Solution code:
n=int(input())
i=1
a=list(map(int,input().split()))
A=[0]

while i<=n:
    A.append(1/a[i-1])
    A[0]+=A[i]
    i+=1

print(1/A[0])

Submission status: Accepted

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

answer = 0

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

print(answer)

Submission status: Accepted

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

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:

n = int(input())

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

sum = 0
for el in lst:
    sum += 1/el

print(1/sum)

Submission status: Accepted

Solution code:
N=int(input())
a=list(map(int,input().split()))
for i in range(0,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 / a for a in A])
print(ans)

Submission status: Accepted

Solution code:
from decimal import Decimal

# 整数の入力
N = int(input())

# スペース区切りの整数の入力
A = map(Decimal, input().split())

under_sum = Decimal(0)

for a in A:
    under_sum += Decimal(1) / Decimal(a)

# 出力
print(Decimal(1)/under_sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

a = int(input())
b = np.array([int(i) for i in input().split()])
c = 1 / np.sum(1 / b)
print(c)

Submission status: Accepted

Solution code:
n = int(input())

a = input().split()

sum_a_rev = 0

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

res = 1/sum_a_rev

print("{}".format(res))

Submission status: Accepted

Solution code:
lens = int(input())
arrs = sum([1/int(x) for x in input().split()])
if arrs != 0:
  print(1/arrs)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    ans = 0
    total = 1
    for i in arr:
        total *= i

    for i in arr:
        ans += total//i

    ans = total/ans

    print(ans)
    

main()

Submission status: Accepted

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

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

s=0
for i in range(len(a)):
    s+=p/a[i]

print(p/s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

denominator = 0

for x in a:
    denominator += (1 / x)

print(1 / denominator)

Submission status: Accepted

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

d = 0.

for x in A:
    d += 1 / x

print(1/d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

d = 0
for i in input().split(" "):
  d += 1.0 / float(i)
  
print(1/d)

Submission status: Accepted

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

print(1/bo)

Submission status: Accepted

Solution code:
from scipy.stats import hmean
n = int(input())
xs = [int(c) for c in input().split()]
print(hmean(xs) / n)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans = 1 / a

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
_,a=open(0);print(1/sum(1/int(i)for i in a.split()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

t = 0
for i in arr:
  t += (1/ i)
  
print(1 / t)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
a=[int(x) for x in 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 = sorted(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())
List=list(map(int,input().split()))
count=0
for i in range(N):
  k=1 / List[i]
  count += k
ans = 1/count
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(1/af)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from fractions import Fraction
n = int(input())
a = sorted(list(map(int, input().split())),reverse=True)
b = [1,]
for i in range(1, n):
    c = Fraction(a[0], a[i])
    b.append(c)
print(float(a[0]/sum(b)))

Submission status: Accepted

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

# print(N)
# print(A)

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

all_sum = 0
for a in A:
	all_sum += all_product / a

answer = all_product / all_sum

print(answer)

Submission status: Accepted

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

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

print("%.5f" % (1/s))

Submission status: Accepted

Solution code:
from fractions import Fraction
def inverse(f):
    return Fraction(f.denominator,f.numerator)

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

all=0
if 1 <= n <=100:
    for i in a[0:n]:    
        b=Fraction(i,1)
        all=all+inverse(b)
    print(float(inverse(all)))

Submission status: Accepted

Solution code:
# cook your dish here


n = int(raw_input())
arr = []
arr = [int(x) for x in raw_input().split()] 
num = 1.0
den = 0
for val in arr:
    num = num * val
for val in arr:
    den = den + num/val
print(num/den)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = input()
p = p.split()
prod = 1
for i in p:
  prod *=int(i)
num = 0;
for i in p:
  num += prod/int(i)
ans = prod/num;
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Fraction クラスを呼びだします
from fractions import Fraction
n=int(input())
m=input().split()
tmp =0

for x in range(0,n):
  a = Fraction(1, int(m[x]))
  tmp+=a
  
a_f = float(Fraction(1, tmp))
print(a_f)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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()))
for i in range(0,n):
  l[i] = 1/l[i]
s = sum(l)
print(1/s)

Submission status: Accepted

Solution code:
N = int(input())

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

A = 0
B = 0
for j in range(N):
    B = 1 / array[j]
    A += B

print(1 / A)

Submission status: Accepted

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

for i in a:
    con += 1 / i

con = 1 / con

print(con)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; cnt = 0; ansli = []; tmpli = []; candili = []; stillset = set()
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def s_list(): return list(input())
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]#HeightString
def mi(n): return [wi() for _ in range(n)]#MatrixInt
def num__grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]#NumberGrid
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]
def grid(n): return [s_list() for _ in range(n)]

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

print(1 / k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
list = [int(i) for i in input().split()]
mama = 1
for item in list:
    mama = mama*item
sum = 0
for item in list:
    sum = sum + (mama/item)
print(mama/sum)

Submission status: Accepted

Solution code:
n=0

n=input()
s=[int(a) for a in list(input().split())]
total=0
for i in s:
    total+= 1/i

print(1/total)

Submission status: Accepted

Solution code:
import math
import fractions

def gcd_list(numbers):
    for i in range(1, len(numbers)):
        ans = fractions.gcd(ans, numbers[i])
    return ans

def lcm_list(numbers):
    ans = numbers[0]
    for i in range(1, len(numbers)):
        ans = ans * numbers[i] // fractions.gcd(ans, numbers[i])
    return ans



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

lcm = lcm_list(A_line)
mother = sum(map(lambda x: lcm//x, A_line))

print(lcm/mother)

Submission status: Accepted

Solution code:
import sys

#+++++
		
def main():
	a=int((input()))
	l = list(map(int, input().split()))
	pp=1
	for i in l:
		pp=pp*i
		
	kk=0
	for i in l:
		kk+=pp/i

	print(pp/kk)
	
	
#+++++

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

Solution code:
num = int(input())
lines = input().split(" ")
itr = iter([int(i) for i in lines])
result = 0

for j in itr:
  result += 1 / j

result = 1 / result
print(result)

Submission status: Accepted

Solution code:
import numpy as np
n=int(input())
a=list(map(int,input().split()))

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

Submission status: Accepted

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

for i in range(N):
    sum = sum + ((A[i])**-1)
    ans = sum**-1

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

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

Submission status: Accepted

Solution code:
n=int(input())
num=input()
num=num.split( )

sum=0
for i in range(n):
    num[i]=int(num[i])
    sum=sum+1/num[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)