title: Find Largest Prime Factor Number
signature: function findLargestPrimeFactorNumber($n) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($n, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($n), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        98, 
        7));
      
      printf("TEST-1...%s\n",driver(
        8, 
        2));
      
      printf("TEST-2...%s\n",driver(
        78, 
        13));
      
      printf("TEST-3...%s\n",driver(
        65, 
        13));
      
      printf("TEST-4...%s\n",driver(
        55, 
        11));
      
      printf("TEST-5...%s\n",driver(
        10, 
        5));
      
      printf("TEST-6...%s\n",driver(
        10, 
        5));
      
      printf("TEST-7...%s\n",driver(
        37, 
        37));
      
      printf("TEST-8...%s\n",driver(
        39, 
        13));
      
      printf("TEST-9...%s\n",driver(
        15, 
        5));
      
  }
  
  main();
  ?>
source_py: def find_largest_prime_factor_number(n):
      maxPrime = (- 1)
      while ((n % 2) == 0):
          maxPrime = 2
          n >>= 1
      for i in range(3, (int(math.sqrt(n)) + 1), 2):
          while ((n % i) == 0):
              maxPrime = i
              n = (n / i)
      if (n > 2):
          maxPrime = n
      return int(maxPrime)
source_cpp: long long find_largest_prime_factor_number(long long n) {
    long long maxPrime = - 1;
    while ( n % 2 == 0 ) {
      maxPrime = 2;
      n >>= 1;
    }
    for ( int i = 3;
    i <= sqrt ( n );
    i += 2 ) {
      while ( n % i == 0 ) {
        maxPrime = i;
        n = n / i;
      }
    }
    if ( n > 2 ) maxPrime = n;
    return maxPrime;
  }