title: Recursively Break Number 3 Parts Get Maximum Sum 1
signature: recursively_break_number_3_parts_get_maximum_sum_1 <- 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(
          50L, 
          57L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          83L, 
          93L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          18L, 
          19L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          24L, 
          27L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          31L, 
          32L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          38L, 
          41L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          94L, 
          104L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          24L, 
          27L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          13L, 
          13L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          53L, 
          57L
      )))
  
  }
  
  main()
source_py: def recursively_break_number_3_parts_get_maximum_sum_1(n):
      dp = ([0] * (n + 1))
      dp[0] = 0
      dp[1] = 1
      for i in range(2, (n + 1)):
          dp[i] = max(((dp[int((i / 2))] + dp[int((i / 3))]) + dp[int((i / 4))]), i)
      return dp[n]
source_cpp: int recursively_break_number_3_parts_get_maximum_sum_1(int n) {
    int dp [ n + 1 ];
    dp [ 0 ] = 0, dp [ 1 ] = 1;
    for ( int i = 2;
    i <= n;
    i ++ ) dp [ i ] = max ( dp [ i / 2 ] + dp [ i / 3 ] + dp [ i / 4 ], i );
    return dp [ n ];
  }