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: Runtime Error

Solution code:
import math

n = int(input())
a = list(map(int, input().split()))
up = -1
down = 1
for i in range(0, n):
    if up == -1:
        up = 1
        down = a[i]
    else:
        tmp = down
        up *= a[i]
        up += tmp
        down *= a[i]
        gcd = math.gcd(up, down)
        up = up // gcd
        down = down // gcd
print(down / up)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(n):
    as[i] = 1 / as[i]
ans = 1 / sum(as)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=[int(input()) for i in range(n)]
for result in range(n):
  1//(1//(a*n))
  print(result)

Submission status: Runtime Error

Solution code:
import math

n = int(input())
a = list(map(int, input().split()))
up = -1
down = 1
for i in range(0, n):
    if up == -1:
        up = 1
        down = a[i]
    else:
        tmp = down
        up *= a[i]
        up += tmp
        down *= a[i]
        gcd = math.gcd(up, down)
        up = int(up / gcd)
        down = int(down / gcd)
print(down / up)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n = int(input())
sum = 0
for i in range(n):
  a = int(input())
  sum += 1/int(a)
ans = 1/int(sum)
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
 def main():
    n = int(input())
    nums = list(map(int, input().split()))
    print('{:.16g}'.format(1 / sum(1 / x for x in nums)))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import numpy as np
 
 
def main():
    n = int(input())
    nums = np.array([int(input()) for i in range(n)])
    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: Runtime Error

Solution code:
import numpy as np
 
 
def main():
	n = int(input())
    nums = np.array([int(input()) for i in range(n)])
    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: Runtime Error

Solution code:
import numpy as np


def main():
	n = int(input())
    nums = np.array([int(input()) for i in range(n)])
    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: Runtime Error

Solution code:
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)
      else:
          break
 
    sum1 = 1/A[0]
 
    for i in range(0,N-1):
      sum1 = sum1 + 1/A[i+1]
 
    result = int(1/sum1)
    print(result)

Submission status: Runtime Error

Solution code:
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 = int(1/sum1)
    print(result)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
N = int(input())
A = []
for i in range(0,N):
  B = int(input())
  A.append(B)

sum1 = float(1/A[0])

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

result = 1/sum1
print(result)

Submission status: Runtime Error

Solution code:
from sys import stdin
n = int(stdin.readline().rsprit())
li = list(map(int,stdin.readline().rstrip().split()))
s = 0
for i in range(n):
    s += 1/li[i]
print(1/s)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

for i in a:
    s = s * i

x = int((n-1) * sum(a))

print(s/x)

Submission status: Runtime Error

Solution code:
from decimal import *
getcontext().prec = 16

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

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

x = (n-1)*sum(a)
print(Decimal(s)/Decimal(x))

Submission status: Runtime Error

Solution code:
from decimal import *


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

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

x = (n-1)*sum(a)
print(Decimal(s)/Decimal(x))

Submission status: Runtime Error

Solution code:
import decimal
n = float(input())
a = list(map(float, input().split()))

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

x = (n-1)*sum(a))
s = decimal.Decimal(7)
x = decimal.Decimal(7)
print(float(s)/x)

Submission status: Runtime Error

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

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

x = float((n-1)*sum(a))
print(float(s)/x)

Submission status: Runtime Error

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

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

x = (n-1)*sum(a)
print(s/x)

Submission status: Runtime Error

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

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

print(float(s/((n-1)*sum(a))))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(1 / gyak1)

Submission status: Runtime Error

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

print(1/sum(s_1))

Submission status: Runtime Error

Solution code:
import numpy as np
import math
from functools import reduce

def gcd_list(numbers):
    return reduce(math.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: Runtime Error

Solution code:
import numpy as np
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.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: Runtime Error

Solution code:
import numpy as np
n = int(input())
s = [input() for int i in range(n)]
a=0
for i in range(n):
	a += 1/s[i]
print(reciprocal(a))

Submission status: Runtime Error

Solution code:
# -*- coding:utf-8 -*-
import numpy as np
from selenium import webdriver
def main():
    n = int(input())
    s = [input() for int i in range(n)]
    a=0
    for int i in range(n):
        a += 1/a
    print(reciprocal(a))

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
# -*- coding:utf-8 -*-
import numpy as np

def main():
        N =int(input())
        A =[int(input()) for i int range(N)]
        a=0
        for i int range(N):
                a += 1/A[i]
        print(reciprocal(a))

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

def main():
        N =int(input())
        A =[int(input()) for i int range(N)]
        a=0
        for i int range(N):
                a += 1/A[i]
        print(reciprocal(a))

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  int a[100];
  int sum=0;
  for(int i=0;i<n;i++){
    cin >> a[i];
    sum=sum+(1/a[i]);
  }
  sum = (1/sum);
  cout << sum << endl;
  return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(N):
  A = int(input())
  ans += 1//A
  
ans = 1//ans

print(ans)

Submission status: Runtime Error

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

for i in range(N):
  A = int(input())
  ans += 1/A
  
ans = 1/ans

print(ans)

Submission status: Runtime Error

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

for i in range(N):
  A = int(input())
  ans += 1/A
  
ans = 1/ans

print(ans

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
count = int(input())
arr = map(float, input())
value = 0
for a in arr:
  value += 1 / a
print("{}".format(1 / value))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
n = int(input())
a = list(map(int, input().split()))

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

print(tmp)

Submission status: Runtime Error

Solution code:
N=int(input())
A=int(input()).split()
c=0
for i in A:
  c+=reciprocal(A[i])
print(reciprocal(c))

Submission status: Runtime Error

Solution code:
N=int(input())
A=int(input()).split()
c=0
for i in A:
  c+=reciprocal(A[i])
print(rexiprocal(c)

Submission status: Runtime Error

Solution code:
N=int(input())
A=int(input()).split()
c=0
for i in N:
  c+=A[i]**-1
print(c**-1)

Submission status: Runtime Error

Solution code:
N = int(input())
A = 0
for i in range(N):
    A = A + 1 / input()
return A

print(1 / A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
sum=0
for i in range(n):
  num=int(input())
  sum+=1/num
print(1/sum)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def main():
    a, b = map(int, input().split())
    # 1 + R * (A - 1) >= B
    print((b - 1 + a - 2) // (a - 1))


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
n = int(input())
y = []
for i in n:
    a = int(input())
    x = 1/a
    y.append(x)

s = sum(y)
an = 1/s

print(s)

Submission status: Runtime Error

Solution code:
from fractions import Fraction

if __name__ == "__main__":
    count = int(input())
    number_list = map(int, input().split(' '))

    sum = 0
    for number in number_list:
        sum += Fraction(1, number)

    up, down = map(int, str(sum).split('/'))
    print(down / up)

Submission status: Runtime Error

Solution code:
from fractions import Fraction

count = int(input())
number_list = map(int, input().split(' '))

sum = 0
for number in number_list:
	sum += Fraction(1, number)

up, down = map(int, str(sum).split('/'))
print(down / up)

Submission status: Runtime Error

Solution code:
from fractions import Fraction

count = int(input())
number_list = map(int, input().split(' '))

sum = 0
for number in number_list:
  sum += Fraction(1, number)

  up, down = map(int, str(sum).split('/'))
  print(down / up)

Submission status: Runtime Error

Solution code:
from fractions import Fraction

def main():
    count = int(input())
    number_list = map(int, input().split(' '))

    sum = 0
    for number in number_list:
        sum += Fraction(1, number)

    up, down = map(int, str(sum).split('/'))
    print(down / up)        

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import math
a, b = [int(x) for x in input().split()]

if b <= a:
  c = 1
else:
  c = math.ceil((b-a) / (a-1)) + 1

print(c)

Submission status: Runtime Error

Solution code:
import math
#a, b = input().split()
a, b = [int(x) for x in input().split()]

#c = math.ceil(b / (a-1))
if b <= a:
  c = 1
else:
  c = math.ceil((b-a) / (a-1)) + 1
  
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

sum = 0

for i in range(v)
	sum = 1/v[i] + sum

ans = 1/(sum/N)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
as = map(int, input().split())
invs = map(lambda x: 1.0 / x, as)
print(1.0 / sum(invs))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

num = 0.
for i in An:
  num += 1/i

print(1/num)

Submission status: Runtime Error

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

print("{.16g}".format(sum(1/x for x in A)))

Submission status: Runtime Error

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

print({:16g}.format(1/sum(1/x for x in A)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = list()
for elem in input().split(' '):
    a.append(int(elem)) 

step = a[1] - a[0]
next =  a[1] + step

while True:
    if next >= a[2]:
        print(next)
        break
    else:
        next +=  step

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=float(1/p)
print(y)

Submission status: Runtime Error

Solution code:
from fractions import Fraction
num = int(input())
l=[]
for i in range(num):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)
p=sum(l)
y=int(1/p)
print(y)

Submission status: Runtime Error

Solution code:
n1 = int(input())
n2 = list(map(int, input().split()))
print(1/((1/n2[0] + 1/n2[1])))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
arr = input()

mother = 0
for i in arr:
  if i != " ":
  	mother = mother + 1 / int(i) 

print(1/mother)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(1/ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
using namespace std;

int main(){
  int N;
  cin >> N;
  vector<double> A(N);
  for(int i=0; i<N; i++)
    cin >> A[i];

  double sum_recip = 0.0;

  for(int i=0; i<N; i++)
    sum_recip += 1 / A[i];

  cout << 1 / sum_recip << endl;
}

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
from decimal import *
import math

def sum_calc(num, number_array):
    sum = 0
    for i in range(len(number_array)):
      if math.remainder(i, 2) != 0:
          continue
      else:
          sum += 1 / int(number_array[i])
    if sum == 0:
      result = 0
    else:
      result = 1 / sum
    result = Decimal(str(result)).quantize(Decimal('.000001'), rounding=ROUND_DOWN)
    return result

num = int(input())
number_array = input()
print(sum_calc(num, number_array))

Submission status: Runtime Error

Solution code:
from decimal import *

def sum_calc(num, number_array):
	sum = 0
    for i in num:
      sum += 1 / number_array[i]
    if sum == 0:
      result = 0
    else:
      result = 1 / sum
    result = Decimal(str(result)).quantize(Decimal('.000001'), rounding=ROUND_DOWN)
    return result

Submission status: Runtime Error

Solution code:
N = int(input())

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

print(sum 1/x for x in A)

Submission status: Runtime Error

Solution code:
N = int(input())

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

import statistics as st

print(st.harmonic_mean(A)/N)

Submission status: Runtime Error

Solution code:
# -*- coding:utf8 -*-

n = int(input())
l = list(map(float, 1 / input().split()))
print(a/sum(l))

Submission status: Runtime Error

Solution code:
test = int(input())
ans =0
while test<0:
  test-=1
  ans = ans+(1/int(input()))
  
print(1/ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
nums = map(int, input().split())
 
return 1 / sum(1 / num for num in nums)

Submission status: Runtime Error

Solution code:
N = input()
nums = input().split()
 
return 1 / sum(1 / int(num) for num in nums)

Submission status: Runtime Error

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

return 1 / sum(1 / num for num in nums)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

x = []
for i in range(A):
    x.append(1/A[i])
    bunbo = sum(x)
print(1 / bunbo)

Submission status: Runtime Error

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

x = []
for i in range(A):
    x.append(1/A[i])
    bunbo = sum(x)
print(1 / bunbo)

Submission status: Runtime Error

Solution code:
d = input()
a = input().split()
r = 0
for i in a:
    r += 1 / i
print(1 / r)

Submission status: Runtime Error

Solution code:
d = input()
a = input().split()
r = 0
for i in a:
    r += 1 / i
print(1/r)

Submission status: Runtime Error

Solution code:
a = input().split()
r = 0
for i in a:
    r += 1 / i
print(1/r)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import fractions
n = int(input())
a = map(float,input().split())
s = fractions.gcd(a)
for i in range(n)
    ans += s / a[i]
print(s/ans)

Submission status: Runtime Error

Solution code:
import fractions
n = int(input())
a = map(float,input().split())
s = fractions.gcd(a)
for i in range(n-1)
    ans += a[i] / s
print(max(a)/ans)

Submission status: Runtime Error

Solution code:
import fractions
n = int(input())
a = map(float,input().split())
s = fractions.gcd(a)
for i in range(n)
    ans += a[i] / s
print(max(a)/ans)

Submission status: Runtime Error

Solution code:
import fractions
n = int(input())
a = map(float,input().split())
s = fractions.gcd(a)
for i in range(n)
    ans += a[i] / s
print(ans/s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
 
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1.0 / int(input())
after_reverse_num = 1.0 / before_reverse_num
print(str(round(after_reverse_num,5)))

Submission status: Runtime Error

Solution code:
n = int(input())

before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(input())
after_reverse_num = 1 / before_reverse_num
print(str(round(after_reverse_num,5)))

Submission status: Runtime Error

Solution code:
n = int(input())
 
before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(input())

after_reverse_num = 1 / before_reverse_num

print(after_reverse_num)

Submission status: Runtime Error

Solution code:
n = int(input())

before_reverse_num = 0
for _ in range(n):
  before_reverse_num += 1 / int(input())
 
after_reverse_num = 1 / before_reverse_num

print(after_reverse_num)

Submission status: Runtime Error

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

print(1/s)

Submission status: Runtime Error

Solution code:
import numpy as np

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

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

Submission status: Runtime Error

Solution code:
import numpy as np

N = int(input())
A_array = np.array(input().split())

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

Submission status: Runtime Error

Solution code:
N = int(input())

num = [int(input()) for i in range(N)]

for i in num:

    sum = 1/i

answer = 1 / sum

print(int(answer))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
A = [input() for i in range(N)]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
num = 0
for _ in range(n):
    num += 1 / int(input())
print(1 / num)

Submission status: Runtime Error

Solution code:
N = 0
numbers = array()

N = int(input())
numbers = input().split()
numbers = [1/int(i) for i in numbers]

print(1/sum(numbers))

Submission status: Runtime Error

Solution code:
N = 0
numbers = array()

N = int(input())
numbers = [1/int(i) for i in input().split()]

print(1/sum(numbers))

Submission status: Runtime Error

Solution code:
N = 0
numbers = array()

N = int(input())
numbers = [1/int(i) for i in input().split()]

print(sum(numbers))

Submission status: Runtime Error

Solution code:
# coding:utf8

N = input()
A = input().split()

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

print(s)

Submission status: Runtime Error

Solution code:
N = input("")
tmp = 0
for n in range(int(N)):
    data = input("")
    tmp += 1 / int(data)

result = 1 / tmp

print(str(result))

Submission status: Runtime Error

Solution code:
n = int(input())
arr = list(map(int,input()))
total = 0
for i in range(n):
  total += (1/arr[i])
 print(1/total)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def product(a):
  result = 1
  for i in a:
    result = result * i
  return result
def foo(a, b):
  result = 0
  for i in a:
    result = result + a/i
  return result
n = int(input())
a = list(map(int, input().split()))
numerator = product(a)
denominator = foo(a, numerator)
print(numerator/denominator)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from functools import reduce


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

numerator = reduce(lambda a, b: a * b, A)
denominator = 0
for i in range(n):
    denominator += reduce(lambda a, b: a * b, A[:i] + A[i+1:])
print(1.0)

Submission status: Runtime Error

Solution code:
from functools import reduce


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

numerator = reduce(lambda a, b: a * b, A)
denominator = 0
for i in range(n):
    denominator += reduce(lambda a, b: a * b, A[:i] + A[i+1:])
print(1.0 * numerator / denominator)

Submission status: Runtime Error

Solution code:
from functools import reduce


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

a = reduce(lambda a, b: a * b, A)
total = 0
for i in range(n):
    total += reduce(lambda a, b: a * b, A[:i] + A[i+1:])
print(1.0 * a / total)

Submission status: Runtime Error

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

sum = 0.0
for x in n:
  sum = sum + 1/x

print(1/sum)