Untitled
unknown
python
3 years ago
375 B
24
Indexable
def count_tan(x1, x2, y1, y2):
if x2 - x1 == 0:
return 10**100
return (y2 - y1) / (x2 - x1)
n = int(input())
a = []
for i in range(n):
a.append(list(map(int, input().split())))
tan = []
for i in range(0, len(a)):
for j in range(i+1, len(a)):
tg = count_tan(a[i][0], a[j][0], a[i][1], a[j][1])
tan.append(tg)
print(len(set(tan)) * 2)Editor is loading...