https://programmers.co.kr/learn/courses/30/lessons/42842
- brown = 2width + 2height - 4
- yellow = widthxheight - 2width - 2height + 4
def solution(brown, yellow):
sum = brown + yellow
# exhaustive search
for height in range(1, sum+1):
if (sum%height)==0:
width = sum/height
if width>=height and brown==2*width+2*height-4:
return [width, height]