title: Finding Power Prime Number P N 1
signature: def findingPowerPrimeNumberPN1(n: Int, p: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, p: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n, p),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        76, 43, 
        1    
      )}")   
  
  
      println(s"TEST-1...${driver(
        77, 91, 
        0    
      )}")   
  
  
      println(s"TEST-2...${driver(
        9, 42, 
        0    
      )}")   
  
  
      println(s"TEST-3...${driver(
        59, 67, 
        0    
      )}")   
  
  
      println(s"TEST-4...${driver(
        8, 52, 
        0    
      )}")   
  
  
      println(s"TEST-5...${driver(
        97, 8, 
        13    
      )}")   
  
  
      println(s"TEST-6...${driver(
        78, 24, 
        3    
      )}")   
  
  
      println(s"TEST-7...${driver(
        41, 88, 
        0    
      )}")   
  
  
      println(s"TEST-8...${driver(
        72, 61, 
        1    
      )}")   
  
  
      println(s"TEST-9...${driver(
        71, 28, 
        2    
      )}")   
  
  }
  
source_py: def finding_power_prime_number_p_n_1(n, p):
      ans = 0
      temp = p
      while (temp <= n):
          ans += (n / temp)
          temp = (temp * p)
      return int(ans)
source_cpp: int finding_power_prime_number_p_n_1(int n, int p) {
    int ans = 0;
    int temp = p;
    while ( temp <= n ) {
      ans += n / temp;
      temp = temp * p;
    }
    return ans;
  }