title: Finding Power Prime Number P N 1
signature: function finding_power_prime_number_p_n_1(n, p)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, p, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n, p), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(76, 43, 1);
      @printf("TEST-0...%s\n",result);
      
      result = driver(77, 91, 0);
      @printf("TEST-1...%s\n",result);
      
      result = driver(9, 42, 0);
      @printf("TEST-2...%s\n",result);
      
      result = driver(59, 67, 0);
      @printf("TEST-3...%s\n",result);
      
      result = driver(8, 52, 0);
      @printf("TEST-4...%s\n",result);
      
      result = driver(97, 8, 13);
      @printf("TEST-5...%s\n",result);
      
      result = driver(78, 24, 3);
      @printf("TEST-6...%s\n",result);
      
      result = driver(41, 88, 0);
      @printf("TEST-7...%s\n",result);
      
      result = driver(72, 61, 1);
      @printf("TEST-8...%s\n",result);
      
      result = driver(71, 28, 2);
      @printf("TEST-9...%s\n",result);
      
  end
  
  main()
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;
  }