package leetcode;

/**
 * https://leetcode.com/problems/guess-number-higher-or-lower-ii/
 */
public class Problem375 {
    public int getMoneyAmount(int n) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem375 prob = new Problem375();
        System.out.println(prob.getMoneyAmount(10)); // 21
    }
}
package leetcode;

/**
 * https://leetcode.com/problems/guess-number-higher-or-lower-ii/
 */
public class Problem375 {
    public int getMoneyAmount(int n) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem375 prob = new Problem375();
        System.out.println(prob.getMoneyAmount(10)); // 16
        System.out.println(prob.getMoneyAmount(15)); // 30
        System.out.println(prob.getMoneyAmount(5)); // 6
    }
}
Update problem 375