diff --git a/458. Poor Pigs b/458. Poor Pigs new file mode 100644 index 0000000..99237b8 --- /dev/null +++ b/458. Poor Pigs @@ -0,0 +1,7 @@ +class Solution +{ +public: int poorPigs(int buckets, int timeDetect, int timeTest) +{ + return ceil(log2(buckets)/log2(int(timeTest/timeDetect)+1)); +} +};