1 2 3 4 5 6 7 8
#include "leetcode.h" class Solution { public: int poorPigs(int buckets, int poisonTime, int totalTime) { return ceil(log(buckets) / log(totalTime / poisonTime + 1)); } };