title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: def maximumNumber2X2SquaresCanFitInsideRightIsoscelesTriangle(base_arg0: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Float , expected: Float): Boolean = {
      (actual - expected).abs < 1e-06F
  }
  
  def driver(base_arg0: Int, expected: Float): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(base_arg0),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        95, 
        1104.375F    
      )}")   
  
  
      println(s"TEST-1...${driver(
        49, 
        287.875F    
      )}")   
  
  
      println(s"TEST-2...${driver(
        10, 
        10.0F    
      )}")   
  
  
      println(s"TEST-3...${driver(
        73, 
        647.875F    
      )}")   
  
  
      println(s"TEST-4...${driver(
        74, 
        666.0F    
      )}")   
  
  
      println(s"TEST-5...${driver(
        40, 
        190.0F    
      )}")   
  
  
      println(s"TEST-6...${driver(
        10, 
        10.0F    
      )}")   
  
  
      println(s"TEST-7...${driver(
        94, 
        1081.0F    
      )}")   
  
  
      println(s"TEST-8...${driver(
        64, 
        496.0F    
      )}")   
  
  
      println(s"TEST-9...${driver(
        16, 
        28.0F    
      )}")   
  
  }
  
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;
  }