[프로그래머스][Lv2] - 카펫(파이썬/Python) def solution(brown, yellow): answer = [] total = brown + yellow for b in range(1,total+1): if (total / b) % 1 == 0: a = total / b if a >= b: if 2*a + 2*b == brown + 4: return [a,b] return answer 문제풀이/프로그래머스 2022.01.21