comefrom: <awangdev>Fast Power_1.java
code: public int fastPower(int a, int b, int n) {
          if (n == 0) {
              return 1 % b;
          }
          if (n == 1) {
              return a % b;
          }
  
          long recurPow = fastPower(a, b, n / 2);
          recurPow = (recurPow * recurPow) % b;
  
          if (n % 2 == 1) {
              recurPow = recurPow * a % b;
          }
  
          return (int)recurPow;
      }
masked: public int sample_funcname ( int a , int b , int n ) {
    if ( n == 0 ) {
      return 1 % b ;
    }
    if ( n == 1 ) {
      return a % b ;
    }
    long recurPow = fastPower ( a , b , n / 2 ) ;
    recurPow = ( recurPow * recurPow ) % b ;
    if ( n % 2 == 1 ) {
      recurPow = recurPow * a % b ;
    }
    return ( int ) recurPow ;
  }
  