title: Finding Power Prime Number P N
signature: pub fn finding_power_prime_number_p_n(n: i32, p: i32) -> f64 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: f64, expected: f64)->bool{
  return (actual - expected).abs() < 1e-09
  }
  pub fn driver(n: i32, p: i32, expected: f64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n, p), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        49, 30, 
        1.6333333333333333
      ));
      
      println!("TEST-1...{}", driver(
        80, 25, 
        3.2
      ));
      
      println!("TEST-2...{}", driver(
        10, 9, 
        1.1111111111111112
      ));
      
      println!("TEST-3...{}", driver(
        81, 57, 
        1.4210526315789473
      ));
      
      println!("TEST-4...{}", driver(
        11, 4, 
        2.75
      ));
      
      println!("TEST-5...{}", driver(
        45, 34, 
        1.3235294117647058
      ));
      
      println!("TEST-6...{}", driver(
        86, 90, 
        0.0
      ));
      
      println!("TEST-7...{}", driver(
        27, 78, 
        0.0
      ));
      
      println!("TEST-8...{}", driver(
        80, 60, 
        1.3333333333333333
      ));
      
      println!("TEST-9...{}", 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;
  }