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: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n=int(input())
l= [np.array(input().split() ,dtype=np.int64)]

print(l)
l2=[]
for i in range(len(l)):
    l2.append(1/(l[i]))
    print(l2)
    sum1=np.sum(l2) 
    print(sum1) 
    ans=1/(sum1)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n):
    ans += np.reciprocal(a[i])
print(np.reciprocal(ans))

Submission status: Wrong Answer

Solution code:
import numpy as np


n=int(input())
B = 1/np.array(list(map(int,input().split())))

print(np.sum(B))

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
aaa = list(map(int, input().split()))
pro = np.prod(aaa)
den = 0
for a in aaa:
    den += pro // a
print(pro / den)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = list(map(int,input().split()))
print(float(1/sum(A)))

Submission status: Wrong Answer

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
A = rl()

if len(A) == 1:
	print(A[0])
	exit()

ans = 1
for a in A:
	ans *= a
s = sum(A)
denom = 0
for a in A:
	denom += (s-a)
ans /= denom
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
A = np.array([int(x) for x in input().split()])
Numer = np.prod(A)
Denom = 0
for T in range(0,N):
    Denom += Numer/A[T]
print(Numer/Denom)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
A = np.array([int(x) for x in input().split()])
Numer = np.prod(A)
Denom = 0
for T in range(0,N):
    Denom += Numer//A[T]
print(Numer/Denom)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

answer=np.sum(1/a)
print(1/answer)

Submission status: Wrong Answer

Solution code:
a = int(input())

s = input()

if(a >= 3200):
    print(s)
else:
    print('red')

Submission status: Wrong Answer

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

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

ans = 0
for i in A:
    ans = ans + inverse(i)

float(inverse(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    N = int(input())
    all = list(map(int, input().split()))
    ans = 0
    for i in all:
        mom = 1/i
        ans += mom
    dad = 1//ans
    print(dad)
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    N = int(input())
    all = list(map(int, input().split()))
    ans = 0
    for i in all:
        ans += 1/i
    print(ans)
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

A = np.array(A)
B = 1 / A
C = B.sum()
print(C)

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
U = 0
D = 0

if len(A) == 1 :
  print(A[0])
else :
  for i in len(A) :
  	U *= A[0]
  	D += A[0]
  print(U/D)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X = int(input())
a = X//500
b = (X - (500*a))//5

print((1000*a) + (5*b))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

d = sum(A)

ans = 1 / d
for i in A:
    ans = ans * i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

C=A**-1
print((C.sum())**-1)

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
a = list(map(int, input().split()))
S = np.prod(a)
T = 0
for x in a:
    T += S / x
print(S / T)

Submission status: Wrong Answer

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

s=1
b=[0]*n
for i in range(n):
  s*=a[i]
  
for i in range(n):
  u=1
  for j in range(n):
    if j!=i:
      u*=a[i]
      
  b[i]=u
  
t=sum(b)

print(s/t)

Submission status: Wrong Answer

Solution code:
n = int(input())
List = list(map(int,input().split()))
s = sum(List)
print(1 / s)

Submission status: Wrong Answer

Solution code:
import math

def main():
    n = int(input())
    a_l = list(map(int, input().split()))
    print( math.fsum(a_l)/ sum(a_l))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = int(input())
b = list(map(int, input().split()))
c = sum(b)
d = 1
for m in b:
    d *= m
print(d/c)

Submission status: Wrong Answer

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

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

print(ret / sum(A))

Submission status: Wrong Answer

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

times = 1
sum = 0

for i in range(N):
  times *= A[i]
for j in range(N):
  sum += A[j]

print(times/sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
n=int(input())
A=[int(_) for _ in input().split()]
prod_A=np.prod(A)
sum_A=0
for i in range(n):
    sum_A+=prod_A/A[i]
print(prod_A/sum_A)

Submission status: Wrong Answer

Solution code:
from functools import reduce

N = [1000]

sum = lambda list: reduce(lambda x, y: x + y, list, 0)
reciprocal = lambda value: 1 / value

reciprocal_N = map(reciprocal, N)
sum_reciprocal_N = sum(reciprocal_N)
answer = reciprocal(sum_reciprocal_N)

print(answer)

Submission status: Wrong Answer

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

sum_A = sum(list_A)
mul_A = 1

for i in range(N):
    a = list_A[i]
    mul_A = mul_A * a
    
print(mul_A/sum_A)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(map(int,input().split()))
sum = 0
mul = 1
for key in a:
    sum += key
    mul *= key
print(mul/sum)

Submission status: Wrong Answer

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
n = int(input())
arrA = list(map(int,input().split()))

multi = 1
for i in arrA:
    multi *= i

sumA = sum(arrA) * (n-1) if sum(arrA) * (n-1) != 0 else 1

ans = multi / sumA

print(ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

Submission status: Wrong Answer

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
n = int(input())
arrA = list(map(int,input().split()))

multi = 1
for i in arrA:
    multi *= i

sumA = sum(arrA)

ans = multi / sumA

print(ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

numerator = 1
denominator = 0

for i in range(N):
    numerator *= A[i]
    denominator += sum(A) - A[i]
if denominator == 0:
    print(numerator)
else:
    print(numerator/denominator)

Submission status: Wrong Answer

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

time = 1
for i in a:
    time *= i

print(time/sum(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
import operator
import functools
N = int(input())
a = list(map(int, input().split()))
sum_a = sum(a)
prod_a = functools.reduce(operator.mul, a, 1)
print(format(prod_a/((N-1)*sum_a), '.16g')) if N!=1 else print(sum(a))

Submission status: Wrong Answer

Solution code:
import operator
import functools
N = int(input())
a = list(map(int, input().split()))
sum_a = sum(a)
prod_a = functools.reduce(operator.mul, a, 1)
print(prod_a/((N-1)*sum_a)) if N!=1 else print(sum(a))

Submission status: Wrong Answer

Solution code:
a=int(input())
import numpy
b=list(map(int,input().split()))
c=0
for i in range(a):
  c+=numpy.reciprocal(b[i])
print(numpy.reciprocal(c))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import sys
import numpy as np

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
max_a = max(A)
numerator = 0
for a in A:
    numerator += max_a // a
print("{:.16g}".format(max_a / numerator))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
#  N = 3
#  A = [200, 200, 200]
max_a = max(A)
numerator = 0
for a in A:
    numerator += max_a // a
print("{}".format(max_a / numerator))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
max_a = max(A)
numerator = 0
for a in A:
    numerator += max_a // a
print("{:.7e}".format(max_a / numerator))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
max_a = max(A)
numerator = 0
for a in A:
    numerator += max_a // a
print("{}".format(max_a / numerator))

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(i) for i in input().split()]
max_a = max(A)
numerator = 0
for a in A:
    numerator += max_a // a
print("{:.7}".format(max_a / numerator))

Submission status: Wrong Answer

Solution code:
N = 1
A = [1000]
max_a = max(A)
numerator = 0
for a in A:
    numerator += max_a // a
print(max_a / numerator)

Submission status: Wrong Answer

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

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

print(float(rev_sum))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = map(int, input().split())
print('{0:.16g}'.format(1/ sum(x for x in A)))

Submission status: Wrong Answer

Solution code:
# 2019-11-17 10:52:21(JST)
import sys
# import collections
# import math
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
import numpy as np


def main():
    n, *a = map(int, sys.stdin.read().split())

    max_cump = np.cumprod(a)[-1]
    
    upper = max_cump
    lower = 0
    for i in range(n):
        lower += max_cump / a[i]
    ans = upper / lower 
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

ans = round(1/ans,6)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from fractions import Fraction

N = int(input())
A = list(map(int,input().split()))
a = []
b = []

for i in A:
  a.append(Fraction(1, i))

print(int(1 / sum(a)))

Submission status: Wrong Answer

Solution code:
from fractions import Fraction

N = int(input())
A = list(map(int,input().split()))
a = []
b = []

for i in A:
  a.append(Fraction(1, i))

print(1 / sum(a))

Submission status: Wrong Answer

Solution code:
n = int(input())
str = input()
ls = [int(u) for u in str.split()]
num = 1
denom = 0
print(ls)
for value in ls:
    denom += (1/value)
print(1/denom)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = map(int,input().split())
A = sum(a)
print(A/A**2/(A/A**2)**2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import numpy as np

n = ii()
a = li()

x = np.prod(a)

y = 0
for i in range(n):
    y += x/a[i]

print(x/y)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
N = int(input())
A = list(map(int, input().split()))
a=0
b=1
for i in A:
    a+=i
    b=b*i
print(b/a)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print (seki/sum(A))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if b == 0:
    print(Alist[0])
else:
    print(a/b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [map(int,input().split())]
B = [map(lambda x : 1/x,A)]
C = [map(lambda x : 1/x,B)]
print(C)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
 
 
def main():
    n = int(input())
    nums = np.array(list(map(int, input().split())))
    n_total = nums.prod()
    n_denominator = sum([n_total/num for num in nums])
    ans = n_total / n_denominator
    print('{:.16g}'.format(ans))
  
  
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np
 
 
def main():
    n = int(input())
    nums = np.array(list(map(int, input().split())))
    n_total = nums.prod()
    n_denominator = sum([n_total/num for num in nums])
    ans = n_total / n_denominator
    print(ans)
  
  
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
try:
    N = int(input())
    if N>0 or N<=100:
        A = []
        for i in range(0,N):
          B = int(input())
          if B>0 or B<=1000:
              A.append(B)
 
        sum1 = 1/A[0]
 
        for i in range(0,N-1):
         sum1 = sum1 + 1/A[i+1]
 
        result = 1/sum1
        print(result)
 
except:
        print("Error")

Submission status: Wrong Answer

Solution code:
try:
    N = int(input())
    if N>0 or N<=100:
        A = []
        for i in range(0,N):
          B = int(input())
          if B>0 or B<=100:
              A.append(B)
 
        sum1 = 1/A[0]
 
        for i in range(0,N-1):
         sum1 = sum1 + 1/A[i+1]
 
        result = 1/sum1
        print(result)
 
except:
        print("Error")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

pro = np.prod(A)
deno = 0
for i in A:
    deno += pro // i

print(pro / deno)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

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

child = a.prod()

mother = 0

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

x = child / mother

print(x)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())

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

b = np.array([])

child = a.prod()

mother = 0
for c in a:
    mother += child / c

x = child / mother

print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(1/a)

Submission status: Wrong Answer

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
print(below)
for b in below:
  belows += b
print(belows)
ans = top/belows
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
A = list(map(int, input().split()))
Y = []
X = np.prod(A)
for i in range(N):
  y = np.prod(A)/A[i]
  Y.append(y)
print(X/sum(Y))

Submission status: Wrong Answer

Solution code:
A=map(int,input().split())
print('{:.16f}'.format(1/sum(1/x for x in A)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

souseki = 1
souwa = sum(number)

for i in range(num):
  souseki *= number[i]
  
print(souseki/souwa)

Submission status: Wrong Answer

Solution code:
n = int(input())
y = []

a = input().split()
for i in range(n):
    x = 1/int(a[i])
    y.append(x)
print(y)

s = sum(y)
an = 1/s

print(an)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = input().split()
sum = 0

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in a:
  l.append(1/i)
  
print(sum(l))

Submission status: Wrong Answer

Solution code:
from functools import reduce

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

print(1 / reduce(lambda x, y : 1/x + 1/y, a))

Submission status: Wrong Answer

Solution code:
a = int(input())
s = input()

print(s if a >= 3200 else "red")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = 1/sum(A)
for a in A:
  ans *= a
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a_n = input().split(" ")
print(a_n)
rev = float(0)
for i in range(n):
  rev += 1/int(a_n[i])
print(1/rev)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n = int(input())

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

print(A)

B = []
c = 0
for k in range(n):
    B.append(1/A[k])

print(B)

for l in range(n):
    c = B[l] + c
    
print(1/c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#coding:utf-8

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

print(1/n)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
overAns = 1
underAns = []
memo = 1
for i in range(N):
    overAns = overAns*A[i]
for i in range(N):
    for j in range(N):
        if j != i:
            memo = memo*A[i]
    underAns.append(memo)
    memo = 1
UA = sum(underAns)
print('{:.16g}'.format(overAns/UA))

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())
A_array = np.array([int(x) for x in input().split()])

a_array = 1/A_array
print(np.sum(a_array))

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

a_array = 1/A_array
print(np.sum(a_array))

Submission status: Wrong Answer

Solution code:
N = int(input())

num = [int(i) for i in input().split()]
sum = 0
for i in num:

    sum += 1/i

answer = 1 / sum

print(int(answer))

Submission status: Wrong Answer

Solution code:
import io
import sys
MOD = 10 ** 9 + 7

def IN_S():
  return input()


def IN_I():
  return int(input())


def IN_L_I():
  return list(map(int, input().split()))


def IN_L_S():
  return list(map(str, input().split()))


def STR_SPLIT(s, n):
  for l in range(0, len(s), n):
    yield s[0 + l:n + l]


def T_IN():
  global test_str
  sys.stdin = io.StringIO(test_str[1:-1])


test_str = '''
3
200 200 200
'''


def MAIN():
  T_IN()
  A()


def A():
  n = IN_I()
  nums = IN_L_I()
  t = 0
  for num in nums:
    t += 1 / num
  
  print (1 / t)
  return None


def B():
  return None


def C():
  return None


MAIN()

Submission status: Wrong Answer

Solution code:
a = input("")
s = input("")

if int(a) >= 3200:
    print(s)
else:
    print("red")

Submission status: Wrong Answer

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

arev_sum = 0
for i in a_int:
    arev_sum += round(1/i, 5)
    
ans = round(1/arev_sum, 5)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(x) for x in input().split()]
overAns = 1
underAns = []
memo = 1
for i in range(N):
    overAns = overAns*A[i]
for i in range(N):
    for j in range(N):
        if j != i:
            memo = memo*A[i]
    underAns.append(memo)
    memo = 1
UA = sum(underAns)
print(overAns/UA)

Submission status: Wrong Answer

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

print(wa)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_ = int(input())
ales = list(map(int, input().split()))
def gcd(a, b):
  while b != 0:
    a, b = b, a%b
  return a
k = ales[0]
for a in ales[1:]:
  k = gcd(k, a)
numerator = int(ales[0]/k)
for a in ales[1:]:
  numerator += int(k/a)
print(k/numerator)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
numbers = []
for number in numbers:
  numbers.append(int(input))
i = 0
s = 0
while i >= n:
  s += 1/numbers[i]
  i += 1

Submission status: Wrong Answer

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

A = map(lambda x: 1 / float(x), A)

print(sum(A))

Submission status: Wrong Answer

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

bunsi = 1
bunbo = 0
for i in A:
    bunsi *= i
    bunbo += i
if N == 1:
    print(bunsi)
else:
    print(bunsi / (len(A) * sum(A) - bunbo))

Submission status: Wrong Answer

Solution code:
N = input()
a = input()
l = a.split()
print(l)
temp = 0
for num in l:
  temp = temp + 1/int(num)

print(1/temp)

Submission status: Wrong Answer

Solution code:
N = input()
a = input()
l = a.split()
print(l)
temp = 0
for num in l:
  temp = temp + int(num)

print(1/temp)

Submission status: Wrong Answer

Solution code:
n = input()

try:
    n = int(n)
    
    sum = 0
    for i in range(n):
        na = input()
        na = int(na)
        
        sum += 1/na
        
    sum = 1 / sum
    print(sum)
    
except ValueError:
    print("数値を入力してください")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

output = np.prod(np.array(list_inp))/np.sum(np.prod(np.array(list_inp))/np.array(list_inp))
print(output)