Skip to content

Commit 641df0f

Browse files
Merge pull request #648 from eric-hjh/main
[황장현] 95차 라이브 코테 제출
2 parents f94ec7c + b598e66 commit 641df0f

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

live9/test95/문제3/황장현.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function solution(brown, yellow) {
2+
for (var y = 3; y <= (brown + yellow) / y; y++) {
3+
var x = Math.floor((brown + yellow) / y);
4+
if ((x - 2) * (y - 2) === yellow) {
5+
break;
6+
}
7+
}
8+
9+
return [x, y];
10+
}
11+
12+
console.log(solution(10, 2));

0 commit comments

Comments
 (0)