@@ -0,0 +1,621 @@
+public class Solution %7B%0A    public int nthUglyNumber(int n) %7B%0A        int x = 0;%0A        int y = 0;%0A        int z = 0;%0A        int%5B%5D result = new int%5Bn%5D;%0A        result%5B0%5D = 1;%0A        %0A        for(int i=1; i%3Cn; i++) %7B%0A            int min = minOf(result%5Bx%5D * 2, result%5By%5D * 3, result%5Bz%5D * 5);%0A            if(min == result%5Bx%5D * 2) x++;%0A            if(min == result%5By%5D * 3) y++;%0A            if(min == result%5Bz%5D * 5) z++;%0A            result%5Bi%5D = min;%0A        %7D%0A        return result%5Bn-1%5D;%0A    %7D%0A    %0A    private int minOf(int a, int b, int c) %7B%0A        int temp = a %3C b ? a : b;%0A        return temp %3C c ? temp : c; %0A    %7D%0A%7D%0A

Create Ugly_Number_II.java