@@ -0,0 +1,535 @@
+package leetcode.ugly_number_ii;%0A%0Apublic class Solution %7B%0A    public int nthUglyNumber(int n) %7B%0A        int%5B%5D ugly = new int%5B1691%5D;%0A        int ug_2 = 0, ug_3 = 0, ug_5 = 0;%0A        ugly%5B0%5D = 1;%0A        for(int i = 1; i %3C 1691; i++)%7B%0A            int nxt = Math.min(ugly%5Bug_2%5D * 2, Math.min(ugly%5Bug_3%5D * 3, ugly%5Bug_5%5D * 5));%0A            ugly%5Bi%5D = nxt;%0A            if(nxt == ugly%5Bug_2%5D * 2) ug_2++;%0A            if(nxt == ugly%5Bug_3%5D * 3) ug_3++;%0A            if(nxt == ugly%5Bug_5%5D * 5) ug_5++;%0A        %7D%0A        return ugly%5Bn - 1%5D;%0A    %7D%0A%7D%0A

Add java solution for 264. Ugly Number II