title: Maximum Value Choice Either Dividing Considering
signature: maximum_value_choice_either_dividing_considering <- 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(
          3L, 
          3L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          19L, 
          24L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          39L, 
          57L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          89L, 
          152L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          96L, 
          192L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          68L, 
          114L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          48L, 
          83L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          5L, 
          5L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          3L, 
          3L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          4L, 
          4L
      )))
  
  }
  
  main()
source_py: def maximum_value_choice_either_dividing_considering(n):
      res = list()
      res.append(0)
      res.append(1)
      i = 2
      while (i < (n + 1)):
          res.append(max(i, (((res[int((i / 2))] + res[int((i / 3))]) + res[int((i / 4))]) + res[int((i / 5))])))
          i = (i + 1)
      return res[n]
source_cpp: int maximum_value_choice_either_dividing_considering(int n) {
    int res [ n + 1 ];
    res [ 0 ] = 0;
    res [ 1 ] = 1;
    for ( int i = 2;
    i <= n;
    i ++ ) res [ i ] = max ( i, ( res [ i / 2 ] + res [ i / 3 ] + res [ i / 4 ] + res [ i / 5 ] ) );
    return res [ n ];
  }