package leetcode;

/**
 * https://leetcode.com/problems/poor-pigs/
 */
public class Problem458 {
    public int poorPigs(int buckets, int minutesToDie, int minutesToTest) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem458 prob = new Problem458();
        System.out.println(prob.poorPigs(1000, 15, 60)); // 5
    }
}

@@ -181,35 +181,121 @@
  // 
-TODO%0A        return
+https://leetcode.com/problems/poor-pigs/discuss/94266/Another-explanation-and-solution%0A        int pigs =
  0;%0A    
 %7D%0A%0A 
@@ -294,161 +294,136 @@
     
-%7D%0A%0A
     
-public static void
+while (Math.pow((minutesToTest /
  m
-a
 in
-(String%5B%5D args) %7B%0A        Problem458 prob = new Problem458();%0A        System.out.println(prob.poorPigs(1000, 15, 60)); // 5
+utesToDie + 1), pigs) %3C buckets) %7B%0A            pigs += 1;%0A        %7D%0A        return pigs;
 %0A   

Solve problem 458