comefrom: <gouthampradhan>math_NthDigit_1.java
code: public int findNthDigit(int n) {
      if (n >= 1 && n <= 9) return n;
      long sum = 0L;
      for (int i = 0; ; i++) {
        long pow = (9 * (new Double(Math.pow(10, i)).longValue())) * (i + 1);
        sum += pow;
        if (sum >= n) {
          long diff = (long) n - (sum - pow);
          long num = diff / (i + 1);
          long mod = diff % (i + 1);
          long result = new Double(Math.pow(10, i)).intValue() + (num - 1) + (mod > 0 ? 1 : 0);
          String resultStr = String.valueOf(result);
          return (mod == 0)
              ? Integer.parseInt(String.valueOf(resultStr.charAt(resultStr.length() - 1)))
              : Integer.parseInt(String.valueOf(resultStr.charAt((int) mod - 1)));
        }
      }
    }
masked: public int sample_funcname ( int var_0 ) {
    if ( var_0 >= 1 && var_0 <= 9 ) return var_0 ;
    long var_4 = 0L ;
    for ( int var_6 = 0 ;
    ;
    var_6 ++ ) {
      long pow = ( 9 * ( new Double ( Math . pow ( 10 , var_6 ) ) . longValue ( ) ) ) * ( var_6 + 1 ) ;
      var_4 += pow ;
      if ( var_4 >= var_0 ) {
        long var_12 = ( long ) var_0 - ( var_4 - pow ) ;
        long var_13 = var_12 / ( var_6 + 1 ) ;
        long var_14 = var_12 % ( var_6 + 1 ) ;
        long var_16 = new Double ( Math . pow ( 10 , var_6 ) ) . intValue ( ) + ( var_13 - 1 ) + ( var_14 > 0 ? 1 : 0 ) ;
        String var_19 = String . valueOf ( var_16 ) ;
        return ( var_14 == 0 ) ? Integer . parseInt ( String . valueOf ( var_19 . charAt ( var_19 . length ( ) - 1 ) ) ) : Integer . parseInt ( String . valueOf ( var_19 . charAt ( ( int ) var_14 - 1 ) ) ) ;
      }
    }
  }
  