title: Recursively Break Number 3 Parts Get Maximum Sum
signature: class Solution {
  
      public Integer recursivelyBreakNumber3PartsGetMaximumSum(Integer n) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(39, 41);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(79, 87);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(7, 7);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(76, 87);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(48, 57);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(18, 19);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(58, 63);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(17, 17);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(36, 41);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(5, 5);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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 );
  }