Problem p02861 (python)

Fixed submission:
import math
N = int(input())
x = [0]*N
y = [0]*N
for i in range(N):
    x[i],y[i] = map(int,input().split())
at=[]
for i in range(N):
    for j in range(N):
        ea = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
        at.append(ea)
da = 0
for ag in at:
    da += ag
avg = da * math.factorial(N - 1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
t = []
for i in range(N):
  t.append(list(map(int,input().split())))
at = []
for i in range(N):
    for j in range(N):
        ea = math.sqrt((t[i][0] - t[j][0])**2 + (y[i][1] - y[j][1])**2)
        at.append(ea)
da = 0
for ag in at:
    da += ag
avg = da * math.factorial(N - 1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
t = []
for i in range(n):
  t.append(list(map(int,input().split())))
at = []
for i in range(N):
    for j in range(N):
        ea = math.sqrt((t[i][0] - t[j][0])**2 + (y[i][1] - y[j][1])**2)
        at.append(ea)
da = 0
for ag in at:
    da += ag
avg = da * math.factorial(N - 1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
xy = [[0,0] for _ in range(N)]
for a in xy:
    a[0], a[1] = map(int, input().split())
x=xy[:,0]
y=xy[:,1]
at = []
for i in range(N):
    for j in range(N):
        ea = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
        at.append(ea)
da = 0
for ag in at:
    da += ag
avg = da * math.factorial(N - 1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
xy = [[0,0] for _ in range(N)]
for a in xy:
    a[0], a[1] = map(int, input().split())
x=a[0]
y=a[1]
at = []
for i in range(N):
    for j in range(N):
        ea = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
        at.append(ea)
da = 0
for ag in at:
    da += ag
avg = da * math.factorial(N - 1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math

N = int(input())
xy = [[0, 0] for _ in range(N)]
for a in xy:
    a[0], a[1] = map(int, input().split())
x = a[0]
y = a[1]

at = []
for i in range(N):
    for j in range(N):
        Da = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
        at.append(Da)
da = 0
for ag in at:
    da += ag
avg = da * math.factorial(N - 1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
N = int(input())
xy = [[0, 0] for _ in range(N)]
for a in xy:
    a[0], a[1] = map(int, input().split())
x = a[0]
y = a[1]

da = np.zeros([N, N])

for i in range(N):
    for j in range(N):
        Da = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
        da[i][j] = Da
avg = np.sum(da) * math.factorial(N - 1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
N = int(input())
xy = [[0,0] for _ in range(N)]
for a in xy:
    a[0], a[1] = map(int, input().split())
x=a[0]
y=a[1]



da = np.zeros([N, N])

for i in range(N):
    for j in range(N):
        Da = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
        da[i][j] = Da
avg = np.sum(da) * math.factorial(N-1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
N = int(input())
xy = [[0,0] for _ in range(N)]
for a in xy:
    a[0], a[1] = map(int, input().split())
x=a[0]
y=a[1]

def distance(x, y, i, j):
    d = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
    return d

da = np.zeros([N, N])
for i in range(N):
    for j in range(N):
        Da = distance(x, y, i, j)
        da[i][j] = Da
avg = da.sum() * math.factorial(N-1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
N = int(input())
xy = [[0,0] for _ in range(N)]
for a in xy:
    a[0], a[1] = map(int, input().split())
x=a[0]
y=a[1]
import math
import numpy as np


def distance(x, y, i, j):
    d = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
    return d

da = np.zeros([N, N])
for i in range(N):
    for j in range(N):
        Da = distance(x, y, i, j)
        da[i][j] = Da
avg = da.sum() * math.factorial(N-1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
N=int(input())

x = [0 for i in range(M)]
y = [0 for i in range(M)]

for i in range(N):
    x[i], y[i]= map(int, input().split())
import math
import numpy as np


def distance(x, y, i, j):
    d = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
    return d

da = np.zeros([N, N])
for i in range(N):
    for j in range(N):
        Da = distance(x, y, i, j)
        da[i][j] = Da
avg = da.sum() * math.factorial(N-1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
N=int(input())

x = [0 for i in range(M)]
y = [0 for i in range(M)]

for i in range(N):
    X[i], Y[i], Z[i] = map(int, input().split())
import math
import numpy as np


def distance(x, y, i, j):
    d = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
    return d

da = np.zeros([N, N])
for i in range(N):
    for j in range(N):
        Da = distance(x, y, i, j)
        da[i][j] = Da
avg = da.sum() * math.factorial(N-1) / math.factorial(N)
print(avg)

Buggy submission (verdict: Runtime Error):
N=int(input())
x,y=map(int,input().split())
import math
import numpy as np


def distance(x, y, i, j):
    d = math.sqrt((x[i] - x[j])**2 + (y[i] - y[j])**2)
    return d

da = np.zeros([N, N])
for i in range(N):
    for j in range(N):
        Da = distance(x, y, i, j)
        da[i][j] = Da
avg = da.sum() * math.factorial(N-1) / math.factorial(N)
print(avg)