diff --git a/problems/poor-pigs.cs b/problems/poor-pigs.cs new file mode 100644 index 0000000..d5e8f20 --- /dev/null +++ b/problems/poor-pigs.cs @@ -0,0 +1,5 @@ +public class Solution { + public int PoorPigs(int buckets, int minutesToDie, int minutesToTest) { + return (int) Math.Ceiling(Math.Log(buckets) / Math.Log(1 + minutesToTest / minutesToDie)); + } +}