mirror of
https://git.wolves.top/wolves/leetcode.git
synced 2025-11-04 17:26:32 +08:00
7 lines
118 B
Python
7 lines
118 B
Python
import math
|
|
|
|
def least_minutes(n: int) -> int:
|
|
if n == 0:
|
|
return 0
|
|
return math.ceil(math.log2(n)) + 1
|