title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: function maximum_number_2x2_squares_can_fit_inside_right_isosceles_triangle(base_arg0)
test_code: using Printf
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  function validate_solution(actual, expected)
      return abs(actual - expected) < 1e-06
  end
  
  function driver(base_arg0, expected)
      try
  
          if validate_solution(PLACEHOLDER_FN_NAME(base_arg0), expected)
              return "PASSED";
          end
          return "FAILED";
      catch exception_obj
          return string(Base.typename(typeof(exception_obj)).wrapper);
      end
  end
  
  function main()
      
      result = driver(95, 1104.375);
      @printf("TEST-0...%s\n",result);
      
      result = driver(49, 287.875);
      @printf("TEST-1...%s\n",result);
      
      result = driver(10, 10.0);
      @printf("TEST-2...%s\n",result);
      
      result = driver(73, 647.875);
      @printf("TEST-3...%s\n",result);
      
      result = driver(74, 666.0);
      @printf("TEST-4...%s\n",result);
      
      result = driver(40, 190.0);
      @printf("TEST-5...%s\n",result);
      
      result = driver(10, 10.0);
      @printf("TEST-6...%s\n",result);
      
      result = driver(94, 1081.0);
      @printf("TEST-7...%s\n",result);
      
      result = driver(64, 496.0);
      @printf("TEST-8...%s\n",result);
      
      result = driver(16, 28.0);
      @printf("TEST-9...%s\n",result);
      
  end
  
  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;
  }