[Level 2] 카펫

나며기·2021년 11월 15일
0

programmers

목록 보기
110/111
post-thumbnail
def solution(brown, yellow):
    total = brown + yellow
    for i in range(total, 2, -1):
        if total % i == 0:
            j = total // i
            if yellow == (i - 2) * (j - 2):
                return [i, j]
profile
PLUS ULTRA

0개의 댓글