title: Find Largest Prime Factor Number
signature: function find_largest_prime_factor_number(n)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return actual == expected
  end
  
  function driver(n, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(n), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(98, 7);
      @printf("TEST-0...%s\n",result);
      
      result = driver(8, 2);
      @printf("TEST-1...%s\n",result);
      
      result = driver(78, 13);
      @printf("TEST-2...%s\n",result);
      
      result = driver(65, 13);
      @printf("TEST-3...%s\n",result);
      
      result = driver(55, 11);
      @printf("TEST-4...%s\n",result);
      
      result = driver(10, 5);
      @printf("TEST-5...%s\n",result);
      
      result = driver(10, 5);
      @printf("TEST-6...%s\n",result);
      
      result = driver(37, 37);
      @printf("TEST-7...%s\n",result);
      
      result = driver(39, 13);
      @printf("TEST-8...%s\n",result);
      
      result = driver(15, 5);
      @printf("TEST-9...%s\n",result);
      
  end
  
  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;
  }