title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: function maximumNumber2X2SquaresCanFitInsideRightIsoscelesTriangle($base_arg0) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return abs($actual - $expected) < 1e-06;
  }
  
  function driver($base_arg0, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($base_arg0), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        95, 
        1104.375));
      
      printf("TEST-1...%s\n",driver(
        49, 
        287.875));
      
      printf("TEST-2...%s\n",driver(
        10, 
        10.0));
      
      printf("TEST-3...%s\n",driver(
        73, 
        647.875));
      
      printf("TEST-4...%s\n",driver(
        74, 
        666.0));
      
      printf("TEST-5...%s\n",driver(
        40, 
        190.0));
      
      printf("TEST-6...%s\n",driver(
        10, 
        10.0));
      
      printf("TEST-7...%s\n",driver(
        94, 
        1081.0));
      
      printf("TEST-8...%s\n",driver(
        64, 
        496.0));
      
      printf("TEST-9...%s\n",driver(
        16, 
        28.0));
      
  }
  
  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;
  }