title: K Th Digit Raised Power B
signature: def kThDigitRaisedPowerB(a: Int, b: Int, k: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Double , expected: Double): Boolean = {
      (actual - expected).abs < 1e-09
  }
  
  def driver(a: Int, b: Int, k: Int, expected: Double): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b, k),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        11, 2, 1, 
        1.0    
      )}")   
  
  
      println(s"TEST-1...${driver(
        41, 3, 3, 
        9.210000000000036    
      )}")   
  
  
      println(s"TEST-2...${driver(
        5, 4, 3, 
        6.25    
      )}")   
  
  
      println(s"TEST-3...${driver(
        1, 2, 4, 
        0.001    
      )}")   
  
  
      println(s"TEST-4...${driver(
        5, 2, 3, 
        0.25    
      )}")   
  
  
      println(s"TEST-5...${driver(
        66, 5, 8, 
        5.233257599999973    
      )}")   
  
  
      println(s"TEST-6...${driver(
        7, 10, 3, 
        2.489999999757856    
      )}")   
  
  
      println(s"TEST-7...${driver(
        77, 30, 10, 
        4.0    
      )}")   
  
  
      println(s"TEST-8...${driver(
        60, 50, 1, 
        0.0    
      )}")   
  
  }
  
source_py: def k_th_digit_raised_power_b(a, b, k):
      p = (a ** b)
      count = 0
      while ((p > 0) and (count < k)):
          rem = (p % 10)
          count = (count + 1)
          if (count == k):
              return rem
          p = (p / 10)
source_cpp: int k_th_digit_raised_power_b(int a, int b, int k) {
    int p = pow ( a, b );
    int count = 0;
    while ( p > 0 && count < k ) {
      int rem = p % 10;
      count ++;
      if ( count == k ) return rem;
      p = p / 10;
    }
    return 0;
  }