TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = [int(x) for x in input()]
ans = 1/sum(1/x for x in a)
print(ans)

n = int(input())
a = [int(x) for x in input().split()]
ans = 1/sum(1/x for x in a)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))

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

print(1 / gyak1)

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

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

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

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
from fractions import Fraction
n = int(input())
a = list(map(int, input().split()))
for i in range(n):
  a[i] = Fraction(1, a[i])

print(Fraction(1,sum(a)))

n = int(input())
a = [0]*n
for i in range(n):
  a[i] = int(input())

def cal(a):
  return 1/a

aa = cal(a)
aa_sum = sum(aa)

print(cal(aa_sum))

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

print(float(Fraction(1,sum(a))))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = map(int, input().split())
under = 0
for i in range(N):
    under += 1 / A[i]
print(1 / under)

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = list(map(int,input().split()))

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

print(1 / sum(A))

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

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

print(1/ans)


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

print(1/ans)


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

print(1/ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
l = list(map(int,input().split()))
xx = 0
for x in l:
	#print(10/x)
	xx += 10/x
print(1/xx)

n = int(input())
l = list(map(int,input().split()))
xx = 0
for x in l:
	xx += 1/x
print(1/xx)

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
A = list(map(int,input().split()))
print(float(1/sum(A)))

N = int(input())
A = list(map(int,input().split()))
B = []
for i in range(N):
    B.append(float(1 / A[i]))

C = float(sum(B))

print(float(1 / C))

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
import numpy as np

# not solved by myself
N = input()
A = list(map(int, input().split()))

Sum = sum(A)
s = []
multi = np.lcm.reduce(A)
for a in A:
    s.append(int(multi / a))


print(int(multi / sum(s)))



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

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

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

print(wa)

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

print(1/wa)

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
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))

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

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

print(float(ans))

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
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)

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)

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)

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)

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
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)

import numpy as np

N = int(input())

A = np.array(input().split(), dtype=np.float64)
ans = 1 / (1/A).sum()

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input().split())
A = list(map(int, input().split()))

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

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

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


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

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
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)


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)

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)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
import fractions
n = int(input())
a = list(map(int,input().split()))
a.sort()
if n==1:
    print(a)
else:
    s = a[0]
    for i in range(1,n):
        s = s * a[i] // fractions.gcd(s, a[i])
    ans = 0
    for i in a:
        print(s//i)
        ans += s//i
    print(s/ans)

import fractions
n = int(input())
a = list(map(int,input().split()))
a.sort()
if n==1:
    print(a)
else:
    s = a[0]
    for i in range(1,n):
        s = s * a[i] // fractions.gcd(s, a[i])
    ans = 0
    for i in a:
        ans += s//i
    print(s/ans)

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


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = list(map(int,input()))

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

print(1 / b)

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

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

print(1 / b)


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

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

print(ans)

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

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

print(1/ans)


Verdicts: Wrong Answer

Accepted
Problem: 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}}.

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(intput())
L = list(map(int, input().split())
L_inv = [1/l for l in L]
print(1 / sum(L_inv))

N = int(input())
L = list(map(int, input().split()))
L_inv = [1/l for l in L]
print(1 / sum(L_inv))



Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
#coding:utf-8

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

print(1/n)

#coding:utf-8

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
A = list(map(int, input().split(' ')))

def multi_all(A):
  s = 1
  for a in A:
    s *= a
  return s

M = multi_all(A)

if N == 1: print(A[0])
else:
  S = 0
  for a in A:
    S += M / a
  print(M/S)


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

def multi_all(A):
  s = 1
  for a in A:
    s *= a
  return s

M = multi_all(A)

if N == 1: print(A[0])
else:
  S = 0
  for a in A:
    S += M / a
  print(M/S)


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = [ int(input()) for i in range(N)]
a = [ 1/i for i in A]
res = 1/(sum(a))
print(res)

N = int(input())
A = [ int(input()) for i in range(N)]
a = [ 1/i for i in A]
res = 1/(sum(a))
print(res)

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())

A = [int(input()) for b in range(N)]
Ans = 0

for i in range(N):
    v += 1 / a[i]
print(1 / Ans)


N = int(input())

A = [int(input()) for _ in range(N)]
Ans = 0

for i in range(N):
    v += 1 / a[i]
print(1 / Ans)


N = int(input())

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

for i in range(N):
    v += 1 / a[i]
print(1 / Ans)

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))
total=0
for i in a:
  total += 1/a
print(1/total)

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
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)

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


Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
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))

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)

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

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

import numpy as np

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

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

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

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
ans = 0
for i in ai:
    ans=ans+1/i

print(1/ans)


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

#print(ai)

ans = 0
for i in ai:
    ans=ans+1/i

print(1/ans)


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
a = int(input())
b = list(map(int,input().split()))
c = 0
for i in range(0,a-1):
  c += c + 1/b[i]
print(1/c)

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N=int(input())
List=list(map(int,input().split()))
a=0
for i in range (len(List)):
   a= a+(1/i)
print (1/a)

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = list(map(int, input()))

rev = []
for a in A:
    rev.append(1/float(a))

print(1/sum(rev))

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

rev = []
for a in A:
    rev.append(1/float(a))

print(1/float(sum(rev)))

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

rev = []
for a in A:
  rev.append(1.0/float(a))
  
print(1.0/float(sum(rev)))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N=int(input())
A=list(int(input()))
sum=0
i=0
while i<=N-1:
  sum+=1/A[i]
  i+=1
rev=1/sum
print(rev)


N=int(input())
A=list(int,input())
sum=0
i=0
while i<=N-1:
  sum+=1/A[i]
  i+=1
rev=1/sum
print(rev)


N=int(input())
A=list(map(int,input().split()))
sum=0
i=0
while i<=N-1:
  sum+=1/A[i]
  i+=1
rev=1/sum
print(rev)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = list(map(int, input(.split())))
output =0

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


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

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
a=int(input())
li = list(map(float,input().split()))
for i in li:
  i = 1/i
s=sum(li)
print(1/s)

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


Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):

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
  
print(Fraction(1, z))


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)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
a = int(input())
s = input()

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


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

for i in a:
    sum += 1 / i


print(1 / sum)


Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input)
An = [int(x) for x in input().split()]

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

print(1/num)


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

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

print(1/num)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n=int(input())
a=map(int,input().split())

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

print(1/ans)

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

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

print(1/ans)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

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

N = int(input())
A = map(int, input().split())
print(1 / sum(1 / x for x in A))

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = list(map(1/(int,input().split())))
print(1/sum(a))

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N=int(input())
A = list(map(int, input().split()))
a=0

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

print(1/a)

    

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

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

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
'''
2
10 30
'''
lens = int(input())
arrs = [1/int(x) for x in input().split()]
print(1/arrs)

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = input()
nums = map(int, input().split())

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

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

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

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

N = input()
nums = map(int, input().split())
 
print(1 / sum(1 / num for num in nums))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = input()
A = list(map(int,input().split()))
A = sum(list(map(lambda x: 1/x, A))
print(1/A)

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

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


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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A =map(int,input().split())
sum=0
for i in range(N):
  sum+=1/A[i]
print(1/sum)
  

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
# -*- coding: utf-8 -*-
N = int(input())
arr = list(map(int, input().split()))
print(arr[0])
total = 0
for a in arr:
    total += 1/a
print(1/total)

# -*- coding: utf-8 -*-
N = int(input())
arr = list(map(int, input().split()))
total = 0
for a in arr:
    total += 1/a
print(1/total)

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
k = list(map(int,input().split()))
sum = 0
for i in k:
  sum += 1/k[i]
print(1/sum)

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A_s = LI()

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

def LI():
  return [int(s) for s in input().split()]

N = int(input())
A_s = LI()
 
total = 0
for a in A_s:
  total+=(1/a)
  
print(1/total)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N=int(input())
a=[int(x) for x in input().split()]

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

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)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))

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

print(1/tmp)

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

print(1/tmp)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

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

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


Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
a,b=map(int,input().split())
print((b-2)//(a-1)+1)

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
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)

N = int(input())
A = list(map(int,input().split()))
B = [None for _ in range(N)]
for i in range(N):
  B[i] = 1/A[i]
print(1/sum(B))

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = map(int, input().split())
c = 0.0
for i in range(N):
  c += (1 / A[i])
print(1/c)
  

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split(" ")))
for i in range(n):
  ans += 1/a[i]
print(1/ans)

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = []
a = list(map(int, input().strip().split()))

print(a)

all_sum = 0

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

ans = 1 / all_sum

print(ans)

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

all_sum = 0

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

ans = 1 / all_sum

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
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))

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())

a = input().split()
print(1/sum(map(lambda x:1/x, a)))

n = int(input())

a = input().split()
print(1/sum(a.map(lambda x:1/x)))

n = int(input())

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N=int(input())
S=0
A=list(map(int,input().split()))
for i in range(N):S+=1/i
print(1/S)


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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())

sum_a = 0
for _ in range(N):
	a = int(input())
    sum_a += 1/a

print(1/sum_a)

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N=int(input())
aa=list(map(int,input().split()))
s=list[]
for i in range(N):
  s[i]=1/s[i]
  s.attend(s[i])
Q=sum(s)  
print(1/Q)  

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)

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
print(1/sum(a))

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

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

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
for i in range(n):
    a.append(input())

# 1 / sum_i(1/a_i)
print(1 / sum([1/i for i in a]))

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

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

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


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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
lis = list(map(int,input().split()))
ing_total = 0

for i in range(n):
    ing_total+= 1 / lis[i]

print(int(1/ing_total)


n = int(input())
lis = list(map(int,input().split()))
ing_total = 0

for i in range(n):
    ing_total+= 1 / lis[i]

print(1/ing_total)


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
c=0;a=input();for i in input().split():
  c+=1/int(i)
print(1/c)

import numpy as np
n = int(input())
a = np.array(list(map(int, input().split())))
print(1/((1/a).sum()))

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input)
A = [float(i) for i in input().split()]

c = 0

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

print(float(1/c))


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

c = 0

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

print(float(1/c))

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

c = 0

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

print(float(1/c))



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N=int(input())
sum=0.0

for i in range(0,N):
  a=int(input())
  sum+=1/a

print(1/sum)


N=int(input())
sum=0.0

A=[i for i in range(N)]

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

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

print(1/sum)


Verdicts: Runtime Error

Accepted
Problem: 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}}.

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

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
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)    

if __name__ == "__main__":
    N = int(input())
    s = input().split()
    sum = 0

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

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = [map(int,input().split())]
B = [map(lambda x : 1/x,A)]
C = [map(lambda x : 1/x,B)]
print(C)


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)

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)


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


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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}}.

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

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


Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
_ = 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)

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

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

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

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

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

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

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
n = int(input())
a=[]
for i in range(n):
    a.append(int(input()))
b=0
for i in range(n):
   b = b + 1/a[i]
b=1/b
print(b)



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



n = int(input())

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

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



Verdicts: Runtime Error

Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
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)

n = int(input())
a = list(map(int, input().split()))
inv_a = [1/i for i in a]
print(round(1/sum(inv_a), 5))

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
n=int(input())
a=list(map(int,input().split()))
r=0
for i in a:
  r+=1/i
print(r)

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

Verdicts: Wrong Answer

Accepted
Problem: 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}}.

Submission attempts (in order):
N = int(input())
A = [ 1/int(i) for i in input().split()]

print(1/sum(s_1))

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

print(1/sum(A))

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
import numpy as np
n=int(input())
a=np.array([int(i) for i in input().split()])
a = 1/a
print(1/(sum(a))

import numpy as np
n=int(input())
a=np.array([int(i) for i in input().split()])
a = 1/a
print(1/sum(a))

Verdicts: Runtime Error

Accepted
Problem: 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}}.

Submission attempts (in order):
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)

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

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

Verdicts: Runtime Error

Accepted