Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
if n == 1:
    print(1)

points = np.zeros((n, 2), dtype=np.int)
for i in range(n):
    x, y = [int(x) for x in input().split()]
    points[i, 0] = x
    points[i, 1] = y

diffs = {}
for i in range(n):
    for j in range(n):
        if i != j:
            diff = (points[i, 0] - points[j, 0], points[i, 1] - points[j, 1])
            if diff in diffs:
                diffs[diff] += 1
            else:
                diffs[diff] = 1

count = sorted(diffs.items(), key=lambda kv: kv[1])[-1][1]
print(n-count)

Fixed submission:
import numpy as np
n = int(input())
if n == 1:
    print(1)
else:
    points = np.zeros((n, 2), dtype=np.int)
    for i in range(n):
        x, y = [int(x) for x in input().split()]
        points[i, 0] = x
        points[i, 1] = y

    diffs = {}
    for i in range(n):
        for j in range(n):
            if i != j:
                diff = (points[i, 0] - points[j, 0], points[i, 1] - points[j, 1])
                if diff in diffs:
                    diffs[diff] += 1
                else:
                    diffs[diff] = 1

    count = sorted(diffs.items(), key=lambda kv: kv[1])[-1][1]
    print(n-count)

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
points = np.zeros((n, 2), dtype=np.int)
for i in range(n):
    x, y = [int(x) for x in input().split()]
    points[i, 0] = x
    points[i, 1] = y

diffs = {}
for i in range(n):
    for j in range(n):
        if i != j:
            diff = (points[i, 0] - points[j, 0], points[i, 1] - points[j, 1])
            if diff in diffs:
                diffs[diff] += 1
            else:
                diffs[diff] = 1

count = sorted(diffs.items(), key=lambda kv: kv[1])[-1][1]
print(n-count)

Fixed submission:
import numpy as np
n = int(input())
if n == 1:
    print(1)
else:
    points = np.zeros((n, 2), dtype=np.int)
    for i in range(n):
        x, y = [int(x) for x in input().split()]
        points[i, 0] = x
        points[i, 1] = y

    diffs = {}
    for i in range(n):
        for j in range(n):
            if i != j:
                diff = (points[i, 0] - points[j, 0], points[i, 1] - points[j, 1])
                if diff in diffs:
                    diffs[diff] += 1
                else:
                    diffs[diff] = 1

    count = sorted(diffs.items(), key=lambda kv: kv[1])[-1][1]
    print(n-count)

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
points = np.zeros((n, 2), dtype=np.int)
for i in range(n):
    x, y = [int(x) for x in input().split()]
    points[i, 0] = x
    points[i, 1] = y

diffs = {}
for i in range(n):
    for j in range(n):
        if i != j:
            diff = (points[i, 0] - points[j, 0], points[i, 1] - points[j, 1])
            if diff in diffs:
                diffs[diff] += 1
            else:
                diffs[diff] = 1

count = sorted(diffs.items(), key=lambda kv: kv[1])[-1][1]
print(n-count)

Fixed submission:
import numpy as np
n = int(input())
if n == 1:
    print(1)
else:
    points = np.zeros((n, 2), dtype=np.int)
    for i in range(n):
        x, y = [int(x) for x in input().split()]
        points[i, 0] = x
        points[i, 1] = y

    diffs = {}
    for i in range(n):
        for j in range(n):
            if i != j:
                diff = (points[i, 0] - points[j, 0], points[i, 1] - points[j, 1])
                if diff in diffs:
                    diffs[diff] += 1
                else:
                    diffs[diff] = 1

    count = sorted(diffs.items(), key=lambda kv: kv[1])[-1][1]
    print(n-count)