Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import re
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))

    return sum(float.is_integer(i) for i in results)


if __name__ == '__main__':
    rows = re.split('\n', sys.stdin.read())
    args = [list(map(int, row.split(' '))) for row in rows][1:]
    print(answer(args))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))
    return sum(float.is_integer(i) for i in results)


n, d = map(int, input().split())
coodinates = [[int(x) for x in input().split()] for _ in range(n)]
print(answer(coodinates))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import re
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))

    return sum(float.is_integer(i) for i in results)


if __name__ == '__main__':
    rows = re.split('\n', sys.stdin.read())
    args = [list(map(int, row.split(' '))) for row in rows][1:]
    print(answer(args))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))
    return sum(float.is_integer(i) for i in results)


n, d = map(int, input().split())
coodinates = [[int(x) for x in input().split()] for _ in range(n)]
print(answer(coodinates))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import re
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))

    return sum(float.is_integer(i) for i in results)


if __name__ == '__main__':
    rows = re.split('\n', sys.stdin.read())
    args = [list(map(int, row.split(' '))) for row in rows][1:]
    print(answer(args))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))
    return sum(float.is_integer(i) for i in results)


n, d = map(int, input().split())
coodinates = [[int(x) for x in input().split()] for _ in range(n)]
print(answer(coodinates))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import re
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))

    return sum(float.is_integer(i) for i in results)


if __name__ == '__main__':
    rows = re.split('\n', sys.stdin.read())
    args = [list(map(int, row.split(' '))) for row in rows][1:]
    print(answer(args))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))
    return sum(float.is_integer(i) for i in results)


n, d = map(int, input().split())
coodinates = [[int(x) for x in input().split()] for _ in range(n)]
print(answer(coodinates))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import re
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))

    return sum(float.is_integer(i) for i in results)


if __name__ == '__main__':
    rows = re.split('\n', sys.stdin.read())
    args = [list(map(int, row.split(' '))) for row in rows][1:]
    print(answer(args))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))
    return sum(float.is_integer(i) for i in results)


n, d = map(int, input().split())
coodinates = [[int(x) for x in input().split()] for _ in range(n)]
print(answer(coodinates))

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import sys
import re
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))

    print(sum(float.is_integer(i) for i in results))


if __name__ == '__main__':
    rows = re.split('\n', sys.stdin.read())
    args = [list(map(int, row.split(' '))) for row in rows][1:]
    print(answer(args))


Fixed submission:
# -*- coding: utf-8 -*-
import sys
import numpy as np
from itertools import combinations


def answer(l):
    results = []
    for i, j in combinations(l, 2):
        v_a = np.array(i)
        v_b = np.array(j)
        results.append(np.linalg.norm(v_a - v_b))
    return sum(float.is_integer(i) for i in results)


n, d = map(int, input().split())
coodinates = [[int(x) for x in input().split()] for _ in range(n)]
print(answer(coodinates))