title: Finding Power Prime Number P N
signature: fun findingPowerPrimeNumberPN(n: Int, p: Int): Double {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Double, expected:Double):Boolean{
    return abs(actual - expected) < 1e-09
  }
  fun driver(n: Int, p: Int, expected:Double):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n, p), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(49, 30, 1.6333333333333333)
      println("TEST-0...${result}")
      
      result = driver(80, 25, 3.2)
      println("TEST-1...${result}")
      
      result = driver(10, 9, 1.1111111111111112)
      println("TEST-2...${result}")
      
      result = driver(81, 57, 1.4210526315789473)
      println("TEST-3...${result}")
      
      result = driver(11, 4, 2.75)
      println("TEST-4...${result}")
      
      result = driver(45, 34, 1.3235294117647058)
      println("TEST-5...${result}")
      
      result = driver(86, 90, 0.0)
      println("TEST-6...${result}")
      
      result = driver(27, 78, 0.0)
      println("TEST-7...${result}")
      
      result = driver(80, 60, 1.3333333333333333)
      println("TEST-8...${result}")
      
      result = driver(97, 31, 3.129032258064516)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def finding_power_prime_number_p_n(n, p):
      ans = 0
      temp = p
      while (temp <= n):
          ans += (n / temp)
          temp = (temp * p)
      return ans
source_cpp: int finding_power_prime_number_p_n(int n, int p) {
    int ans = 0;
    int temp = p;
    while ( temp <= n ) {
      ans += n / temp;
      temp = temp * p;
    }
    return ans;
  }