Skip to content

Commit 9ff10bd

Browse files
committed
66차 3번 제출
1 parent 1ba04f3 commit 9ff10bd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

live6/test66/문제3/이지은.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function solution(n, a, b) {
2+
let round = 0;
3+
4+
while (a !== b) {
5+
a = Math.ceil(a / 2);
6+
b = Math.ceil(b / 2);
7+
round++;
8+
}
9+
10+
return round;
11+
}
12+
13+
console.log(solution(8, 4, 7));

0 commit comments

Comments
 (0)