Skip to content

Commit

Permalink
28.py
Browse files Browse the repository at this point in the history
  • Loading branch information
huisuu committed Aug 18, 2024
1 parent 2cf8417 commit f8ef7ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions HSKIM/21to30/28.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def solution(n, a, b):
answer = 0
while a != b:
a = (a + 1) // 2
b = (b + 1) // 2
answer += 1
return answer

print(solution(8, 4, 7))

0 comments on commit f8ef7ff

Please sign in to comment.