카펫 https://programmers.co.kr/learn/courses/30/lessons/42842
function solution(brown, yellow) {
for (let height = 1; height <= yellow; height++) {
if (yellow % height === 0) {
const width = yellow / height;
const temp = 2 * height + 2 * width + 4;
if (temp === brown) {
return [width + 2, height + 2];
}
}
}
}