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


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


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

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(1/int(),input().split()))

print(1/sum(a))

N=int(input())
a=list(map(1/int,input().split()))
print(1/sum(a))

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

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

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

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

bottom = 0
for i in range(N):
    bottom += top / A[i]

ans = top / bottom
print(ans)

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

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

bottom = 0
for i in range(N):
    bottom += top / A[i]

ans = top / bottom
print(round(ans, 6))

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

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

bottom = 0
for i in range(N):
    bottom += top / A[i]

ans = top / bottom
print(ans)

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

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

bottom = 0
for i in range(N):
    bottom += top / A[i]

ans = top / bottom
print(round(ans, 6))

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):
L=lambda:list(map(int,input().split()))
n=int(input())
a=L()
b=0
for i in a:b+=1/a
print(1/b)

n=int(input())
a=list(map(int,input().split()))
ans=0
for i in a: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):
N = int(input())
s = input().split()
sum = 0

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


N = int(input())
s = input().split()
sum = 0

for i in range(N):
    sum = sum + 1/(int(s[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())
v = list(map(int,input().split()))

sum = 0

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

ans = 1/(sum/N)

print(ans)

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)

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)

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

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):
X = int(input())
a = X//500
b = (X - (500*a))//5

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

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

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

print(1 / denominator)

n = int(input())

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

print(1 / denominator)

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 = ans + 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]
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())
res = list(map(int, input().split()))
ans = 0 
for x in res:
  ans += 1/res
print(1/ans)

n = int(input())
res = list(map(int, input().split()))
ans = 0 
for x in res:
  ans += 1/x
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 = input()
a = input()
l = a.split()
print(l)
temp = 0
for num in l:
  temp = temp + 1/int(num)

print(1/temp)

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

print(1/temp)

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

print(1/temp)

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=map(int(),input().split()) 
ans=0
for a in A:
  ans+=a
print(ans)

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

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

Verdicts: Runtime Error

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())
list = [int(i) for i in input().split()]
gyaku = 0

for j in list:
  gyaku += round(1/j,5)

print(round(1/gyaku, 5))

N = int(input())
list = [int(i) for i in input().split()]
gyaku = 0

for j in list:
  #gyaku += round(1/j,5)
  gyaku += float(1/j)

#print(round(1/gyaku, 5))
print(1/gyaku)

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

d=1
m=0
for i in range(n):
  d *= i
  m += i

ans = d/m
print(ans)

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

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

ans = d/m

print(ans)

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

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

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 = list(map(int, input().split()))
ans = 0
for i in range(n):
    ans += np.reciprocal(a[i])
print(np.reciprocal(ans))

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

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):
size = int(input())
li = list(map(int,input().split()))
s = 0
for i in li:
  s += 1/i
print(1/s  


size = int(input())
li = list(map(int,input().split()))
s = 0
for i in li:
    s += (1/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):
n = int(input())
a = input().split(' ')
for i in range(n):
  a[i] = int(a[i])
print(a)

def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a

bunshi = 1
bunbo = a[0]
for i in range(1, n):
  bunshi = bunbo + a[i]
  bunbo = bunbo * a[i]
  gcd = gcd(bunbo, bunshi)
  bunbo = bunbo / gcd
  bunshi = bunshi / gcd
print(bunbo / bunshi)

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

print(1 / res)

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

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

def invNum(n):
    return 1 / n

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

main()

# -*- coding: utf-8 -*-

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

def invNum(n):
    return 1 / n

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

main()

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())
n = list(map(int, input().split()))
b = []
for i in range(len(n)):
    b.append(1/n[i])
ans = sum(b)
print(ans)

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

a = int(input())
n = list(map(int, input().split()))
b = []
for i in range(len(n)):
    b.append(1/n[i])
ans = 1/sum(b)
print(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):
#Resistors in Parallel
N = int(input())
lst_A = [1/int(input()) for i in range(N)]

print(1/sum(lst_A))

N = int(input())
lst_A = [1/int(input()) for i in range(N)]
#print('lst_A:', lst_A)
print(1/sum(lst_A))

N = input()
lst_A = [1/int(input()) for i in range(N)]

print(1/sum(lst_A))

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

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):
a,b = map(int,input().split())
i = 0
while 2*a+(a-1)*(i-2)  <b:
  i += 1
print(i+1)

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

ans = 0

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

print (1/ans)

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

ans = 0

for i in s:
    ans += (1/i)
    
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):
N = 0
numbers = array()

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

print(1/sum(numbers))


N = 0
numbers = array()

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

print(sum(numbers))

N = 0
numbers = array()

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

print(1/sum(numbers))

N = 0
numbers = []

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

print(1/sum(numbers))


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()))
l = []

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

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

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

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())
arr = input()

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

print(1/mother)

N = int(input())
arr = input()

hoge = arr.split(" ")

mother = 0
for i in hoge:
  mother = mother + 1 / int(i) 

print(1/mother)

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())
ans = 0
for i in range(n):
  a = int(input())
  ans += 1 / a;
print(1 / ans)

n = int(input())
ans = 0
lis = list(map(int, input().split()))
for i in lis:
  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):
N = int(input())
li = list(map(int,input().split()))
li2 = []
for i in li:
    li2.append(1/i)
print(sum(li2))

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

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

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

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

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)

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

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

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(float, input().split()))
deno = 1
for i in range(N):
    deno += 1/A[i]
print(1/deno)


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


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

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

for i in A:
    S+=1/i

print(1/S)


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

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

print(1/S)


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

for i in A:
    S+=1/A

print(1/S)


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

for i in A:
    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

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

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

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

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

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

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

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

print(1 / sum(1 / a for a 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):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().solit())))
print(1/sum(1/A))

import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))
print(1/sum(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())
A = list(map(int, input().split()))

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

ans = 1 / S
print('[:.6g]'.format(ans))


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

ans = 1 / S
print('{:.6g}'.format(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(",")))
tmp = 0
A.sorted()
for i in range(N):
  tmp = tmp + 1/A[i]
  
print(1/tmp)

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

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

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

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=[map(int,input().split())]
s=0
for i in A:
 s+=1/i
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

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 = map(lambda x: 1 / float(x), A)

print(sum(A))


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

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

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

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


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




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)
At = 1 / Aarr
print(1 / sum(At))


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

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


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=[]
c=0
for i in range(n):
    b=int(input())
    c+=1.0/b
print(1.0/c)

     


n=int(input())
a=[]
c=0
for i in range(n):
    b=int(input())
    c+=1.0/b
print(1.0/c)

     



n=int(input())
a=map(int,input().split())
print({:.16g}.format(1/sum(1/x for x in a)))


n=int(input())
a=map(int,input().split())
print("{:.16g}".format(1/sum(1/x for x in 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 = map(int,input().split())

print(sum 1/x for x in A)

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())
#s = input()
#S = []

S = input().split(" ")
SUM = 0
for i in range(N):
    temp = S[i]
    temtem = 1 / temp
    SUM += temtem
Ans = 1 / SUM
print(Ans)




N = int(input())
#s = input()
#S = []

S = input().split(" ")
SUM = 0
for i in range(N):
    temp = int(S[i])
    temtem = 1 / temp
    SUM += temtem
Ans = 1 / SUM
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())
x=0
y=1
a=list(map(int,input().split()))
if n==1:
    print(a[0])
else:
    for i in range(0,n):
        x=a[i]+x
        y=a[i]*y
        ans=y/x
        if x==a[0]*n:
            print(a[0]/n)
        else:
            print(ans)


n=int(input())
x=0
y=1
a=list(map(int,input().split()))
if n==1:
    print(a[0])
else:
    for i in range(0,n):
        x=a[i]+x
        y=a[i]*y
        ans=y/x
        if x==a[0]*n:
            print(round(a[0]/n,5))
        else:
            print(round(ans,5))


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


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

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

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

B = []
C = 0

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

for l in range(n):
    C = B[l] + C
    
print(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):
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))

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)

print(float(inverse(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):
import sys
for l in sys.stdin:
    a.append(l)

a_array = a[1].split(' ')

sum = 0

for i in a_array:
    sum += (1 / int(i))

print(1 / sum)

import sys
a = []
for l in sys.stdin:
    a.append(l)

a_array = a[1].split(' ')
a_array

sum = 0

for i in a_array:
    sum += (1 / int(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 = [1 / int(input()) for _ in range(n)]
print(1 / sum(a))
  

n = int(input())
a = [1 / int(x) for x 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):
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)

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)


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

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

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

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 = int(input())
as = map(int, input().split())
invs = map(lambda x: 1.0 / x, as)
print(1.0 / sum(invs))

N = int(input())
numbers = map(int, input().split(" "))
invs = map(lambda x: 1.0 / x, numbers)
print(1.0 / sum(invs))

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


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


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)
print('{:.16g}'.format(1 / sum(x for x in A)))

N = int(input())
A = list(map(int, input().split()))
print('{:.16g}'.format(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()
nums = input().split(" ")
rev = float(0)
for i in range(int(n)):
  rev += 1/nums[i]
print(1/rev)

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)

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

Verdicts: Runtime Error

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

sum = 0

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

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

sum = 0

for i in range(n):
  sum += 1/l[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):
import numpy as np


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

print(np.sum(B))




import numpy as np


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

print(1/np.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=map(int,input().split())
b=0
for i in a:
  b+=(1/i)
print(b)

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

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



n=int(input())
a=list(map(int,input().split()))
sum=0
for i in range(n):
  sum=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):
tmp = int(input())
A = []
for i in range(0,tmp):
    A.append(int(input()))
sum = 0
for i in range(0,tmp):
    sum = sum + 1/A.pop()

print(1/sum)

tmp = int(input())
A = [int(i) for i in input().split()]
sum = 0
for i in range(0,tmp):
    sum = sum + 1/A.pop()
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(froat,input().split())
for i in range(n-1)
    r += 1 / a[i]
print(1/r)

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

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)

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)

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

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)

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

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)

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

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

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

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

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 collections import defaultdict
import sys
import math
from datetime import datetime

def sol(n, S):
    ret = 0
    for s in S:
        print(s)
        ret += (1.0 / s)
        print (ret)
    return (1.0/ret)



do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    S = list(map(int, parsed_lines[1]))
    # S = parsed_lines[1][0]
    # return n, k, S
    return n, S


if not do_submit:
    n, S = input_parse("""
    2
    10 30
    """)
    print(sol(n, S))

else:
    n = int(input().strip())
    S = list(map(int, input().split()))
    #S = input().split()
    # print(sol(n, k, S))

    #s = input().strip()
    # S = input().strip()
    print(sol(n, S))

from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(n, S):
    ret = 0
    for s in S:
        #print(s)
        ret += (1.0 / s)
        #print (ret)
    return (1.0/ret)



do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    S = list(map(int, parsed_lines[1]))
    # S = parsed_lines[1][0]
    # return n, k, S
    return n, S


if not do_submit:
    n, S = input_parse("""
    2
    10 30
    """)
    print(sol(n, S))

    n, S = input_parse("""
    3
    200 200 200
    """)
    print(sol(n, S))

    n, S = input_parse("""
    1
    1000
    """)
    print(sol(n, S))



else:
    n = int(input().strip())
    S = list(map(int, input().split()))
    #S = input().split()
    # print(sol(n, k, S))

    #s = input().strip()
    # S = input().strip()
    print(sol(n, 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):
N=int(input())
A=list(map(int,input().split()))
total=0
for i in range(N):
    total+=1/A[i]
print(int(1/total))

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

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

print(ans
  

N = int(input())
ans = 0

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

print(ans)
  

N = int(input())
ans = 0

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

print(ans)
  

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

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

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()))
for i in range(len(a)):
  a[i]=1/a[i]
  
print(sum(a))

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

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

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

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

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

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

N = int(input())
A = map(int, input().split())
print('{:.16g}'.format(1 / sum(1 / x for x in 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=[int(x) for x in input().split()]
c=0
for i in range(n):
  c+=1//i
print(1//c)

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

n=int(input())
a=[int(x) for x in input().split()]
c=0
for i in range(n):
  c+=a[i]**(-1)
print(c**(-1))

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

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)

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

Verdicts: Runtime Error

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

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

print(1/sum)

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

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

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

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


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


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

preans=0

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

print(1/preans)

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

preans=0

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

print(1/preans)

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):
num = int(input())
box = []
for i range(num):
  box.append(1/int(input()))
print(1/sum(box))

num = int(input())
box1 = [int(s) for s in input().split()]
box = []
for i in box1:
  box.append(1/i)
print(1/sum(box))



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

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

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

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

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




def convert_Arc(x):
  return 1/x

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


Verdicts: Runtime Error

Accepted