<awangdev>Ugly Number_2.java
public long kthPrimeNumber(int k) {
    	if (k == 0) {
    		return 0;
    	}
    	PriorityQueue<Long> queue = new PriorityQueue<Long>();
    	queue.offer((long)3);
    	queue.offer((long)5);
    	queue.offer((long)7);
    	long num = 0;
		for (int i = 0; i < k; i++) {
			num = queue.poll();
			if (num % 3 == 0) {
				queue.offer(num  * 3);
			} else if (num % 5 == 0) {
			    queue.offer(num  * 3);
				queue.offer(num  * 5);
			} else if (num % 7 == 0) {
				queue.offer(num  * 3);
				queue.offer(num  * 5);
				queue.offer(num  * 7);
			}
		}
		return num;
    }
public long sample_funcname ( int var_0 ) {
  if ( var_0 == 0 ) {
    return 0 ;
  }
  PriorityQueue < Long > var_4 = new PriorityQueue < Long > ( ) ;
  var_4 . offer ( ( long ) 3 ) ;
  var_4 . offer ( ( long ) 5 ) ;
  var_4 . offer ( ( long ) 7 ) ;
  long var_9 = 0 ;
  for ( int var_10 = 0 ;
  var_10 < var_0 ;
  var_10 ++ ) {
    var_9 = var_4 . poll ( ) ;
    if ( var_9 % 3 == 0 ) {
      var_4 . offer ( var_9 * 3 ) ;
    }
    else if ( var_9 % 5 == 0 ) {
      var_4 . offer ( var_9 * 3 ) ;
      var_4 . offer ( var_9 * 5 ) ;
    }
    else if ( var_9 % 7 == 0 ) {
      var_4 . offer ( var_9 * 3 ) ;
      var_4 . offer ( var_9 * 5 ) ;
      var_4 . offer ( var_9 * 7 ) ;
    }
  }
  return var_9 ;
}
