package leetcode;

/**
 * https://leetcode.com/problems/string-without-aaa-or-bbb/
 */
public class Problem984 {
    public String strWithout3a3b(int A, int B) {
        // TODO
        return null;
    }

    public static void main(String[] args) {
        Problem984 prob = new Problem984();
    }
}

@@ -167,130 +167,1149 @@
     
-// TODO%0A        return null;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem984 prob = new Problem984(
+StringBuilder answer = new StringBuilder();%0A        int a = A;%0A        int b = B;%0A        while (a + b %3E 0) %7B%0A            if (A %3E= B) %7B%0A                if (a %3E 0) %7B%0A                    answer.append(%22a%22);%0A                    a--;%0A                %7D%0A                if (b %3E 0) %7B%0A                    answer.append(%22b%22);%0A                    b--;%0A                %7D%0A            %7D else %7B%0A                if (b %3E 0) %7B%0A                    answer.append(%22b%22);%0A                    b--;%0A                %7D%0A                if (a %3E 0) %7B%0A                    answer.append(%22a%22);%0A                    a--;%0A                %7D%0A            %7D%0A        %7D%0A        return answer.toString();%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        Problem984 prob = new Problem984();%0A        System.out.println(prob.strWithout3a3b(1, 2));%0A        System.out.println(prob.strWithout3a3b(4, 1));%0A        System.out.println(prob.strWithout3a3b(3, 1));%0A        System.out.println(prob.strWithout3a3b(1, 3));%0A        System.out.println(prob.strWithout3a3b(3, 3));%0A        System.out.println(prob.strWithout3a3b(4, 4));%0A        System.out.println(prob.strWithout3a3b(4, 5)
 );%0A 

Update problem 984