TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

Submission attempts (in order):
from sys import stdin
n = int(stdin.readline().rsprit())
s = stdin.readline().rstrip()

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

from sys import stdin
n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

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

Verdicts: Runtime Error

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

Submission attempts (in order):
import sys
sys.setrecursionlimit(10**6)
n,q = map(int,input().split())
a=[[] for i in range(n)]
p=[]*n
l=[0]*n
ans=[0]*n

def dfs(parent,current,value):
    value += l[current]
    ans[current] = value
    for i in a[current]:
        if i == parent:
            continue
        dfs(current,i,value)


for i in range(n-1):
    t1,t2 = map(int,input().split())
    a[t1-1].append(t2-1)
    a[t2-1].append(t1-1)
    
for i in range(q):
    t1,t2 = map(int,input().split())
    l[t1-1]+=t2
dfs(-1,0,0)

print(" ".join(map(str,ans)))

a=int(input())
s=input()


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

Verdicts: Runtime Error

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

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

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

a = input()
s = input()

if a < 3200:
  print(s)
else:
  print("red")

a = int(input())
s = input()

if a < 3200:
  print(s)
else:
  print("red")

a = int(input())
s = input()

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

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

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

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


a = input()
s = input()

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


a = input()
s = input()

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

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

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

print(1/sum)


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

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

print(1/sum)


a = int(input())
s = input()

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


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

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

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

a = int(input())
s = input()

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


Verdicts: Wrong Answer

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

Submission attempts (in order):
A = int(input())
B = input()

if A >= 3200:
  print(red)
else:print(B)

A = int(input())
B = input()

if A < 3200:
  print("red")
else:print(B)

Verdicts: Runtime Error

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

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

def ave(c1,c2):
  av = (c1 + c2)/2
  return av

for i in range(N-1):
  for j in range(i+1,N):
    if a[j] <= a[i]:
      tmp = a[i]
      a[i] = a[j]
      a[j] =tmp
print(a)

for i in range(N-1):
  average = ave(a[0],a[1])
  a.pop(0)
  a.pop(0)
  a.insert(0,average)

print(int(a[0]))



N = int(input())
s = input()
 
if N >= 3200:
  print(s)
else:
  print('red')

Verdicts: Runtime Error

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

Submission attempts (in order):
a=int(input())
s=input()
if a>=3200:
  print("red")
else:
  print(s)

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


Verdicts: Wrong Answer

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

Submission attempts (in order):
print('red' if int(int(input())<3200 else input())

print('red' if int(input())<3200 else input())

Verdicts: Runtime Error

Accepted
Problem: You will be given an integer a and a string s consisting of lowercase English letters as input.  Write a program that prints s if a is not less than 3200 and prints `red` if a is less than 3200.

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

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


a = int(input())
s = input()

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


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

input_size = int(input())
inputs = input().split()
sum = 0
for i in range(input_size):
  sum += 1 / int(inputs[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())
numbers = []
i = 0
while i <= n:
  numbers.append(int(input()))
  i += 1

j = 0
s = 0
while n >= j:
  s += 1/numbers[j]
  j += 1

print(1/s)

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

n = int(input())
numbers = []
for number in numbers:
  numbers.append(int(input))

i = 0
s = 0
while i >= n:
  s += 1/numbers[i]
  i += 1

print(1/s)

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



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

Verdicts: Runtime Error

Wrong Answer

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):
from functools import reduce

N = [1000]

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

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

print(answer)
    

from functools import reduce

N = int(input())
A = input()
A = map(lambda Ai: int(Ai), A.split())

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

reciprocal_A = map(reciprocal, A)
sum_reciprocal_A = sum(reciprocal_A)
answer = reciprocal(sum_reciprocal_A)

print(answer)


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()
for elem in input().split(' '):
    a.append(int(elem)) 

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

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

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

sum = 0;
for number in a:
    sum+=1/number

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 io
import sys
MOD = 10 ** 9 + 7

def IN_S():
  return input()


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


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


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


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


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


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


def MAIN():
  T_IN()
  A()


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


def B():
  return None


def C():
  return None


MAIN()


import io
import sys
MOD = 10 ** 9 + 7

def IN_S():
  return input()


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


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


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


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


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


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


def MAIN():
  # T_IN()
  A()


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


def B():
  return None


def C():
  return None


MAIN()


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

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

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


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


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

N = int(input())
A = list(map(int, input().split()))
import numpy as np
A = np.array(A)
A_inv = 1/A
print(1/np.sum(A_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 = []
for i in range(N):
  A.append(int(input()))

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

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

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


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(float ,input().split()))
sum=float(0)
for i in range(N)
	sum+=A[i]/(A[i]**2)
sum=sum**sum
print(sum)

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

import numpy as np
n=int(input())
a=np.array(list(map(float,input().split())))
print(float(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())
aa = list(map(int, input().strip().sprit()))

g = 0


for a in aa:
    g += 1 / a

print(1 / g)

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

g = 0


for x in a:
    g += 1 / x

print(1 / g)

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

g = 0


for a in aa:
    g += 1 / a

print(1 / g)

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

N = int(input())
A = list(map(int, input().split()))
ans = 0
for a in A:
    if a == 0:
        continue
    ans += 1 / a
if ans == 0:
    print(0)
else:
    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())
List=[int(i) for i in input().split()]
List.sort()
print(List)
num = 0
ans = []
while num < a:
  res = (List[num] + List[num+1])/2
  ans.append(res)
  resa = (ans[num] + List[num+2])/2
  num = num + 1
  if num == a:
  print(resa)
  break


a = int(input())
List=[int(i) for i in input().split()]
k = [1/i for i in List]
m = sum(k)
print(1/m)

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()).split()
c=0
for i in N:
  c+=A[i]**-1
print(c**-1)

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


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


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


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

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().rstrip())
A = input().rstrip().split(" ")
a = 1
b = 0
for i in range(N):
  a *= int(A[i])
  b += int(A[i])
c = a / b
print('{:.6f}'.format(c))

N = int(input().rstrip())
A = input().rstrip().split(" ")
a = 1
b = 0
for i in range(N):
  a *= int(A[i])
  b += int(A[i])
c = b / a
print('{:.6f}'.format(c))

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

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

lst = []

for i in range(n):
    lst.append(int(input()))

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

print(1/sum)


n = int(input())

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

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

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())
print(sum([1/float(a) for a in input().split()]))


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

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

n = int(input())
a = 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 = list(map(int,input()))
ans = 0
for _a in a:
    ans +=1/_a
print(1/ans)

n = int(input())
a = list(map(int,input().split()))
ans = 0
for _a in a:
    ans +=1/_a
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):
from functools import reduce
import operator

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

from functools import reduce
import operator
 
n =int(input())
a = [int(x) for x in 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):
a = int(input())
s = input()
if a >= 3200:
    print(s)
else:
    print('red')



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



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())
A = sum(a)
print(A/A**2/(A/A**2)**2)

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

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()))
new_a=[i**(-1) for i in a]
print(new_a)
aa=sum(new_a)
print(aa**(-1))

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

n=int(input())
a=[]
p=[int(e) for e in input().split()]
i=0
while i<n:
  a=a+[1/p[i]]
  i+=1
x=sum(a)
print(1/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=np.array(list(map(int,input().split())))
print(1/sum(1/A))


import numpy as np
import sys
import math

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):
import numpy as np

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

nA = np.array(A)
print(np.reciprocal(np.sum(np.reciprocal(nA))))


import numpy as np

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

nA = np.array(A)
print(np.reciprocal(np.sum(np.reciprocal(nA))))

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 = sorted(list(map(float, input().split())),reverse=True)
b = [1]
for i in range(1, n):
    c = float(a[0]) // a[i]
    b.append(c)
print('{:.5f}'.format(float(a[0]) / sum(b)))

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

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

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

n = input()
try:
    n = int(n)
    
    v = [int(x) for x in input().split(' ')]
    
    sum = 0
    for i in range(len(v)):        
        sum += 1/v[i]
        
    sum = 1 / sum
    print(sum)

    
except ValueError:
    print("数値を入力してください")

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

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

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


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

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

def inverse(A):
  A = sum(A)
  def inverse(A):
    print(sum(A))
    

N = int(input())

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

b = sum(reverse(a)) for a in A

print(sum(severse(b)))

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

A = [1/a for a in A]

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

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

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())
num_list = map(int, input().split())
def ave(nums):
    rev_sum = 0
    for i in nums:
        rev_sum += 1/i
    ans = 1/rev_sum
    return ans

ave(num_list)

n = int(input())
num_list = list(map(int, input().split()))
def ave(nums):
    rev_sum = 0
    for i in nums:
        rev_sum += 1/i
    ans = 1/rev_sum
    return ans

print(ave(num_list))

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 main():
    a, b = map(int, input().split())
    # 1 + R * (A - 1) >= B
    print((b - 1 + a - 2) // (a - 1))


if __name__ == "__main__":
    main()


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

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


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()]
max_a = max(A)
numerator = 0
for a in A:
    numerator += max_a // a
print("{:.7e}".format(max_a / numerator))



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


N = int(input())
A = [int(i) for i in input().split()]
ans = 0.0
for a in A:
    ans += 1.0 / a
ans = 1.0 / ans
print("{}".format(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):
v

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

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

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

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

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

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

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, raw_input().split())
l = [int(s) for s in l]

total = 0
for i in l:
  total += 1/i

print(1/total)

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

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

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

_=input()
print(1/sum[1/r for r in list(map(int,input().split()))])

_=input()
print(1/sum([1/r for r in list(map(int,input().split()))]))

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):
from fractions import Fraction
n=int(input())
a=list(map(int,input().split()))
b=0
for i in range(n):
  b+=Fraction(1,a[i])
ans=Fraction(1,b)

print(ans)

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

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):
a=int(input())
b=list(map(int,input().split()))
print(b/a)

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

import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
a=int(input())
b=list(map(int,input().split()))
n=lcm_list(b)
m=0
for i in b:
    m+=n//i
print(n/m)

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):
def main():
    
    n = int(input())
    a = []
    for i in range(n): 
        a.append( 1/int(input()))

    print(sum(a))
    

if __name__ == "__main__":
    main()

n = int(input())
a = [int(1/e) for e in input().split()]

print(1/sum(a))


def main():
    
    n = int(input())
    a = []
    for i in range(n): 
        a.append( 1/int(input()))

    print(1/sum(a))
    

if __name__ == "__main__":
    main()

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

print(1/sum(a))


n = int(input())
a = [1/int(e) for e in input().split()]

print(1/sum(a))


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):
from fractions import Fraction
N=int(input())
l=[]
for i in range(N):
    k=int(input())
    x=Fraction(1, k)
    l.append(x)

p=sum(l)
y=float(1/p)
print(y)

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

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

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

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

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


n=int(input())
l=list(input().split())
sum_m=0
for i in l:
	sum_m+=1/i
print(1/sum_m)

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

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())
i=1 
a=[0]
A=[0]

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

print(1/A[0])

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

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

print(1/A[0])



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
a = int(input())
sum = 0
for i in range(a):
  bb = int(input())
  sum += b
np.reciprocal(sum)
np.reciprocal(sum)
print(sum)

a = int(input())
sum = 0
for i in range(a):
  b = int(input())
  sum += pow(b, -1)
print(pow(sum, -1)

N = int(input())
A = [int(x) for x in input().split()]
for i in range(N):
  sam += A[i]**-2
print(sam**-2)

import numpy as np
a = int(input())
b = []
sum = 0
for i in a:
  b[i] = int(input())
  sum += b[i]
print(np.reciprocal(np.reciprocal(sum)))

import numpy as np
a = int(input())
b = []
sum = 0
for i in range(a):
  b[i] = int(input())
  sum += b[i]
np.reciprocal(sum)
np.reciprocal(sum)
print(sum)

a = input()
b = []
sum = 0
for i in a:
  b[i] = input()
  sum += b[i]
print(reciprocal(reciprocal(sum)))


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

a = int(input())
b = []
sum = 0
for i in range(a):
  b[i] = int(input())
  sum += b[i]
print(sum)

a = int(input())
sam = 0
b = 0
for i in range(a):
  b = int(input())
  sam += pow(b, -1)
print(pow(sam, -1)

import numpy as np
a = int(input())
sum = 0
for i in range(a):
  b = int(input())
  sum += b
np.reciprocal(sum)
np.reciprocal(sum)
print(sum)

a = int(input())
b = []
sum = 0
for i in a:
  b[i] = int(input())
  sum += b[i]
print(reciprocal(reciprocal(sum)))

a = int(input())
sam = 0
b = 0
for i in range(5):
  b = int(input())
  sam += b**-2
print(sam**-2)

import numpy as np
a = int(input())
b = []
sum = 0
for i in range(a):
  b[i] = int(input())
  sum += b[i]
print(np.reciprocal(np.reciprocal(sum)))

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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

n=int(input())
l = list(map(int,input().split()))
b = sum([1/x for x in l])
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=map(int,input().split())
s=sum(1/i) for i in A
t=1/s
print(t)

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

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 N
float sum = 0
N = input() 
for i in N
	s = input()
	sum = (float)1/s
print(sum)

int N
float sum = 0
N = input() 
for i in range(N)
	s = input()
	sum = (float)1/s
print(sum)

sum = 0
N = input() 
for i in range(int(N)):
	s = float(input())
	sum = sum+(1/s)
print(sum)

sum = 0
N = input() 
for i in range(N):
	s = input()
	sum += 1/s
print(sum)

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

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(). strip(). split()))
for i in range(n):
    A[i]=1/A[i]
print(round(sum(A),5))

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

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 functools import reduce

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

P = reduce(lambda a,b:a*b,As)

print(P/sum([P/a for a in As]))

from functools import reduce

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

P = reduce(lambda a,b:a*b,As)

print(P/sum([P/a for a in As]))

from functools import reduce

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

P = reduce(lambda a,b:a*b,As)

print(P/sum([P/a for a in As]))

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())
alist = list(map(int, input().split()))
alist = np.array(alist)
gyakulist = 1 / alist
print(1/sum(gyakulist))

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

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

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

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

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

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

n = int(input())
def f(x):
    return 1 / x
List = list(map(int, input().split()))
List2 = [x for x in map(f, List)]
s = sum(List2)
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):
n=int(input())
a=list(map(int,input().split()))
s=0
for i in range(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 = input()
a = list(map(int, input()))
for i in a:
    i = 1/i
print(sum(i) for i in a)

n = input()
a = list(map(int, input().split()))
a = [1/i for i in a]
b = sum(t for t in a )
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()))

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

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

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

ans_t=1/ans_t
print(ans_t)

n = int(input())
S = list(map(float,input().split()))
ans_t = 0

for i in S:
	ans = 1/i
	#print(ans)
	ans_t = ans + ans_t

ans_t=1/ans_t
print(ans_t)

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):
# -*- coding:utf8 -*-

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


# -*- coding:utf8 -*-

n = int(input())
l = list(map(int, input().split()))
f = [1/i for i in l]
print(1/sum(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):
n = input()
a = input().split(' ')
a_int = [int(i) for i in asp]

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

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

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

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

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

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

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

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

Verdicts: Runtime Error

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):
N = int(input())
list_a = [[i for i in input()] for _ in range(N)]

gyaku_su_list = [1/a for a in list_a]
print(1 / sum(gyaku_su_list))

N = int(input())
list_a = [i for i in input()]
 
gyaku_su_list = [1/a for a in list_a]
print(1 / sum(gyaku_su_list))

N = int(input())
list_a = list(map(int, input().split())) 
 
gyaku_su_list = [1/a for a in list_a]
print(1 / sum(gyaku_su_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 = float(input())
A = list(map(float, input().split()))
j = float(0)
ans = float(0)
for i in A:
    J += 1/i
ans = 1/j
print(ans)

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

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 sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
#from collections import defaultdict

#import fractions
#import math
#import collections
#from collections import deque

#from bisect import insort_left
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
#import heapq
#import numpy as np
#INF = float("inf")
N = int(input())
A = list(map(int,input().split()))
s = 0
for i in A:
    s += A**(-1)
print(s**(-1))

import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
#from collections import defaultdict

#import fractions
#import math
#import collections
#from collections import deque

#from bisect import insort_left
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
#import itertools
#import heapq
#import numpy as np
#INF = float("inf")
N = int(input())
A = list(map(int,input().split()))
s = 0
for i in A:
    s += i**(-1)
print(s**(-1))

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())
x =0
for a in A:
  x+=1/A
print("{:,5f}".format(1/x))

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

for a in A:
    ans += 1/a
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()))
b = list(i/i for i in a)
print(1/(sum(b)))

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


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