title: Finding Power Prime Number P N 1
signature: pub fn finding_power_prime_number_p_n_1(n: i32, p: i32) -> i32 {
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: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, p: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n, p), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        76, 43, 
        1
      ));
      
      println!("TEST-1...{}", driver(
        77, 91, 
        0
      ));
      
      println!("TEST-2...{}", driver(
        9, 42, 
        0
      ));
      
      println!("TEST-3...{}", driver(
        59, 67, 
        0
      ));
      
      println!("TEST-4...{}", driver(
        8, 52, 
        0
      ));
      
      println!("TEST-5...{}", driver(
        97, 8, 
        13
      ));
      
      println!("TEST-6...{}", driver(
        78, 24, 
        3
      ));
      
      println!("TEST-7...{}", driver(
        41, 88, 
        0
      ));
      
      println!("TEST-8...{}", driver(
        72, 61, 
        1
      ));
      
      println!("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;
  }