title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: fun maximumNumber2X2SquaresCanFitInsideRightIsoscelesTriangle(base_arg0: Int): Float {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Float, expected:Float):Boolean{
    return abs(actual - expected) < 1e-06f
  }
  fun driver(base_arg0: Int, expected:Float):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(base_arg0), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(95, 1104.375f)
      println("TEST-0...${result}")
      
      result = driver(49, 287.875f)
      println("TEST-1...${result}")
      
      result = driver(10, 10.0f)
      println("TEST-2...${result}")
      
      result = driver(73, 647.875f)
      println("TEST-3...${result}")
      
      result = driver(74, 666.0f)
      println("TEST-4...${result}")
      
      result = driver(40, 190.0f)
      println("TEST-5...${result}")
      
      result = driver(10, 10.0f)
      println("TEST-6...${result}")
      
      result = driver(94, 1081.0f)
      println("TEST-7...${result}")
      
      result = driver(64, 496.0f)
      println("TEST-8...${result}")
      
      result = driver(16, 28.0f)
      println("TEST-9...${result}")
      
          
  }
  
  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;
  }