<awangdev>Ugly Number II_1.java
public int nthUglyNumber(int n) {
        if (n <= 1) return n;
        int[] dp = new int[n];
        dp[0] = 1;
        int index2 = 0, index3 = 0, index5 = 0;
        int factor2 = 2, factor3 = 3, factor5 = 5;
        for (int i = 1; i < n; i++){
            int min = Math.min(Math.min(factor2, factor3), factor5);
            dp[i] = min;
            if (factor2 == min) factor2 = dp[++index2] * 2;
            if (factor3 == min) factor3 = dp[++index3] * 3;
            if (factor5 == min) factor5 = dp[++index5] * 5;
        }
        return dp[n-1];
    }
public int sample_funcname ( int var_0 ) {
  if ( var_0 <= 1 ) return var_0 ;
  int [ ] var_2 = new int [ var_0 ] ;
  var_2 [ 0 ] = 1 ;
  int var_4 = 0 , var_5 = 0 , var_6 = 0 ;
  int var_8 = 2 , var_10 = 3 , var_12 = 5 ;
  for ( int var_13 = 1 ;
  var_13 < var_0 ;
  var_13 ++ ) {
    int min = Math . min ( Math . min ( var_8 , var_10 ) , var_12 ) ;
    var_2 [ var_13 ] = min ;
    if ( var_8 == min ) var_8 = var_2 [ ++ var_4 ] * 2 ;
    if ( var_10 == min ) var_10 = var_2 [ ++ var_5 ] * 3 ;
    if ( var_12 == min ) var_12 = var_2 [ ++ var_6 ] * 5 ;
  }
  return var_2 [ var_0 - 1 ] ;
}
