We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f94ec7c + b598e66 commit 641df0fCopy full SHA for 641df0f
1 file changed
live9/test95/문제3/황장현.js
@@ -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