title: Find Largest Prime Factor Number
signature: findLargestPrimeFactorNumber :: Integer -> Integer
  findLargestPrimeFactorNumber n = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      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) )
  
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;
  }