package leetcode;

/**
 * https://leetcode.com/problems/integer-break/
 */
public class Problem343 {
    public int integerBreak(int n) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem343 prob = new Problem343();
        System.out.println(prob.integerBreak(2)); // 1
        System.out.println(prob.integerBreak(36)); // 36
    }
}

@@ -143,15 +143,281 @@
     
-// TODO
+if (n == 1) %7B%0A            return 1;%0A        %7D%0A        int x = n / 2;%0A        int y = n - x;%0A        int n1 = integerBreak(x);%0A        int n2 = integerBreak(y);%0A        int multiply1 = x * y;%0A        int multiple2 = n1 * n2;%0A        int max = Math.max(multiply1, multiple2);
 %0A   
@@ -432,9 +432,11 @@
 urn 
-0
+max
 ;%0A  
@@ -633,19 +633,132 @@
 eak(
-36)); // 36
+10)); // 36%0A        System.out.println(prob.integerBreak(1)); // 1%0A        System.out.println(prob.integerBreak(14)); // 162
 %0A   

Update problem 343