title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: function maximumNumber2X2SquaresCanFitInsideRightIsoscelesTriangle(base_arg0) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return Math.abs(actual - expected) < 1e-06;
  }
  
  function driver(base_arg0, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(base_arg0),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(95, 1104.375);
    console.log(`TEST-0...${result}`);
  
    result = driver(49, 287.875);
    console.log(`TEST-1...${result}`);
  
    result = driver(10, 10.0);
    console.log(`TEST-2...${result}`);
  
    result = driver(73, 647.875);
    console.log(`TEST-3...${result}`);
  
    result = driver(74, 666.0);
    console.log(`TEST-4...${result}`);
  
    result = driver(40, 190.0);
    console.log(`TEST-5...${result}`);
  
    result = driver(10, 10.0);
    console.log(`TEST-6...${result}`);
  
    result = driver(94, 1081.0);
    console.log(`TEST-7...${result}`);
  
    result = driver(64, 496.0);
    console.log(`TEST-8...${result}`);
  
    result = driver(16, 28.0);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    main();
  }
source_py: def maximum_number_2x2_squares_can_fit_inside_right_isosceles_triangle(base):
      base = (base - 2)
      base = (base / 2)
      return ((base * (base + 1)) / 2)
source_cpp: int maximum_number_2x2_squares_can_fit_inside_right_isosceles_triangle(int base) {
    base = ( base - 2 );
    base = base / 2;
    return base * ( base + 1 ) / 2;
  }