serega1112

458

Jan 15th, 2021
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. class Solution:
  2.     def poorPigs(self, buckets: int, minutesToDie: int, minutesToTest: int) -> int:
  3.        
  4.         for i in range(0, 11):
  5.             limit = (minutesToTest // minutesToDie + 1) ** i
  6.             if limit >= buckets:
  7.                 return i
Advertisement
Add Comment
Please, Sign In to add comment