title: Finding Power Prime Number P N
signature: findingPowerPrimeNumberPN(n, p) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return (actual - expected).abs() < 1e-09;
  }
  
  String driver(n, p, double expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n, p), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          49, 30, 
          1.6333333333333333)
      }");
  
      print("TEST-1...${driver(
          80, 25, 
          3.2)
      }");
  
      print("TEST-2...${driver(
          10, 9, 
          1.1111111111111112)
      }");
  
      print("TEST-3...${driver(
          81, 57, 
          1.4210526315789473)
      }");
  
      print("TEST-4...${driver(
          11, 4, 
          2.75)
      }");
  
      print("TEST-5...${driver(
          45, 34, 
          1.3235294117647058)
      }");
  
      print("TEST-6...${driver(
          86, 90, 
          0.0)
      }");
  
      print("TEST-7...${driver(
          27, 78, 
          0.0)
      }");
  
      print("TEST-8...${driver(
          80, 60, 
          1.3333333333333333)
      }");
  
      print("TEST-9...${driver(
          97, 31, 
          3.129032258064516)
      }");
  
      return 0;
  }
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;
  }