title: Finding Power Prime Number P N
signature: findingPowerPrimeNumberPN :: Integer -> Integer -> Double
  findingPowerPrimeNumberPN n p = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Double -> Double -> Bool
  validateSolution actual expected = do
      (abs (actual-expected)) < 1e-09
  
  driver :: Integer -> Integer -> Double -> String
  driver n p expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n p) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (49) (30) (1.6333333333333333) )
  
      printf "TEST-1...%s\n" (driver (80) (25) (3.2) )
  
      printf "TEST-2...%s\n" (driver (10) (9) (1.1111111111111112) )
  
      printf "TEST-3...%s\n" (driver (81) (57) (1.4210526315789473) )
  
      printf "TEST-4...%s\n" (driver (11) (4) (2.75) )
  
      printf "TEST-5...%s\n" (driver (45) (34) (1.3235294117647058) )
  
      printf "TEST-6...%s\n" (driver (86) (90) (0.0) )
  
      printf "TEST-7...%s\n" (driver (27) (78) (0.0) )
  
      printf "TEST-8...%s\n" (driver (80) (60) (1.3333333333333333) )
  
      printf "TEST-9...%s\n" (driver (97) (31) (3.129032258064516) )
  
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;
  }