출처: https://school.programmers.co.kr/learn/courses/30/lessons/42842 def solution(brown, yellow): answer = [] 넓이 = brown + yellow for 세로 in range(1, 넓이 + 1): if 넓이 % 세로 == 0: 가로 = 넓이 // 세로 if 가로 >= 세로 and brown == 2 * 가로 + 2 * 세로 - 4: return [가로, 세로] return answer