title: Maximize Volume Cuboid Given Sum Sides
signature: class Solution {
  
      public Integer maximizeVolumeCuboidGivenSumSides(Integer s) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer s, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(s,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(67, 11132);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(48, 4096);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(59, 7600);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(22, 392);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(14, 100);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(66, 10648);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(1, 0);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(75, 15625);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(58, 7220);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(78, 17576);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer s, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(s),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
source_py: def maximize_volume_cuboid_given_sum_sides(s):
      maxvalue = 0
      i = 1
      for i in range((s - 1)):
          j = 1
          for j in range(s):
              k = ((s - i) - j)
              maxvalue = max(maxvalue, ((i * j) * k))
      return maxvalue
source_cpp: int maximize_volume_cuboid_given_sum_sides(int s) {
    int maxvalue = 0;
    for ( int i = 1;
    i <= s - 2;
    i ++ ) {
      for ( int j = 1;
      j <= s - 1;
      j ++ ) {
        int k = s - i - j;
        maxvalue = max ( maxvalue, i * j * k );
      }
    }
    return maxvalue;
  }