Skip to content

Commit 7d41c27

Browse files
committed
Solution as on 19-08-2022 11:56 pm
1 parent 2c958e0 commit 7d41c27

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

0458. Poor Pigs.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// 458.✅ Poor Pigs
2+
3+
class Solution
4+
{
5+
public:
6+
int poorPigs(int buckets, int poisonTime, int totalTime)
7+
{
8+
return ceil(log(buckets) / log(totalTime / poisonTime + 1));
9+
}
10+
};

0 commit comments

Comments
 (0)