title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: maximum_number_2x2_squares_can_fit_inside_right_isosceles_triangle <- function(base_arg0) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      abs(actual - expected) < 1e-06
  }
  
  driver <- function(base_arg0, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(base_arg0), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          95L, 
          1104.375
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          49L, 
          287.875
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          10L, 
          10.0
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          73L, 
          647.875
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          74L, 
          666.0
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          40L, 
          190.0
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          10L, 
          10.0
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          94L, 
          1081.0
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          64L, 
          496.0
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          16L, 
          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;
  }