title: Maximum Value Choice Either Dividing Considering
signature: pub fn maximum_value_choice_either_dividing_considering(n: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        3, 
        3
      ));
      
      println!("TEST-1...{}", driver(
        19, 
        24
      ));
      
      println!("TEST-2...{}", driver(
        39, 
        57
      ));
      
      println!("TEST-3...{}", driver(
        89, 
        152
      ));
      
      println!("TEST-4...{}", driver(
        96, 
        192
      ));
      
      println!("TEST-5...{}", driver(
        68, 
        114
      ));
      
      println!("TEST-6...{}", driver(
        48, 
        83
      ));
      
      println!("TEST-7...{}", driver(
        5, 
        5
      ));
      
      println!("TEST-8...{}", driver(
        3, 
        3
      ));
      
      println!("TEST-9...{}", driver(
        4, 
        4
      ));
      
  }
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 ];
  }