프로그래머스

William Parker·2022년 12월 5일

from itertools import combinations

def solution(dots):
a = []
for (x1,y1),(x2,y2) in combinations(dots,2):
a.append((y2-y1,x2-x1))

for (x1,y1),(x2,y2) in combinations(a,2):
    if x1*y2==x2*y1:
        return 1
return 0
profile
Developer who does not give up and keeps on going.

0개의 댓글