458.可怜的小猪
一、进制
class Solution:
def poorPigs(self, buckets: int, minutesToDie: int, minutesToTest: int) -> int:
k = minutesToTest // minutesToDie
return math.ceil(math.log(buckets) / math.log(k+1))最后更新于
class Solution:
def poorPigs(self, buckets: int, minutesToDie: int, minutesToTest: int) -> int:
k = minutesToTest // minutesToDie
return math.ceil(math.log(buckets) / math.log(k+1))最后更新于