title: Recursively Break Number 3 Parts Get Maximum Sum
signature: recursivelyBreakNumber3PartsGetMaximumSum :: Integer -> Integer
  recursivelyBreakNumber3PartsGetMaximumSum 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 (39) (41) )
  
      printf "TEST-1...%s\n" (driver (79) (87) )
  
      printf "TEST-2...%s\n" (driver (7) (7) )
  
      printf "TEST-3...%s\n" (driver (76) (87) )
  
      printf "TEST-4...%s\n" (driver (48) (57) )
  
      printf "TEST-5...%s\n" (driver (18) (19) )
  
      printf "TEST-6...%s\n" (driver (58) (63) )
  
      printf "TEST-7...%s\n" (driver (17) (17) )
  
      printf "TEST-8...%s\n" (driver (36) (41) )
  
      printf "TEST-9...%s\n" (driver (5) (5) )
  
source_py: def recursively_break_number_3_parts_get_maximum_sum(n):
      if ((n == 0) or (n == 1)):
          return n
      return max(((recursively_break_number_3_parts_get_maximum_sum((n // 2)) + recursively_break_number_3_parts_get_maximum_sum((n // 3))) + recursively_break_number_3_parts_get_maximum_sum((n // 4))), n)
source_cpp: int recursively_break_number_3_parts_get_maximum_sum(int n) {
    if ( n == 0 || n == 1 ) return n;
    return max ( ( recursively_break_number_3_parts_get_maximum_sum ( n / 2 ) + recursively_break_number_3_parts_get_maximum_sum ( n / 3 ) + recursively_break_number_3_parts_get_maximum_sum ( n / 4 ) ), n );
  }