title: Find Largest Prime Factor Number
signature: find_largest_prime_factor_number <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          98L, 
          7L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          8L, 
          2L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          78L, 
          13L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          65L, 
          13L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          55L, 
          11L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          10L, 
          5L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          10L, 
          5L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          37L, 
          37L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          39L, 
          13L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          15L, 
          5L
      )))
  
  }
  
  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;
  }