This website works better with JavaScript
Sākums
Izpētīt
Palīdzība
Reģistrēties
Pierakstīties
wolves
/
leetcode
spogulis no
https://git.wolves.top/wolves/leetcode.git
Vērot
1
Pievienot zvaigznīti
0
Atdalīts
0
Faili
Problēmas
0
Vikivietne
Koks:
68a402077a
Atzari
Tagi
main
leetcode
/
greed
/
lcs01.py
lcs01.py
118 B
Vēsture
Neapstrādāts
1
2
3
4
5
6
import math
def least_minutes(n: int) -> int:
if n == 0:
return 0
return math.ceil(math.log2(n)) + 1