title: Maximize Volume Cuboid Given Sum Sides 1
signature: func maximizeVolumeCuboidGivenSumSides1(s int) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(s int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(s),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(8, 18)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(96, 32768)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(96, 32768)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(96, 32768)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(12, 64)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(95, 31744)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(72, 13824)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(81, 19683)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(42, 2744)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(13, 81)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def maximize_volume_cuboid_given_sum_sides_1(s):
      length = int((s / 3))
      s -= length
      breadth = (s / 2)
      height = (s - breadth)
      return int(((length * breadth) * height))
source_cpp: int maximize_volume_cuboid_given_sum_sides_1(int s) {
    int length = s / 3;
    s -= length;
    int breadth = s / 2;
    int height = s - breadth;
    return length * breadth * height;
  }