title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: maximumNumber2X2SquaresCanFitInsideRightIsoscelesTriangle(base_arg0) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return (actual - expected).abs() < 1e-06;
  }
  
  String driver(base_arg0, double expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(base_arg0), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          95, 
          1104.375)
      }");
  
      print("TEST-1...${driver(
          49, 
          287.875)
      }");
  
      print("TEST-2...${driver(
          10, 
          10.0)
      }");
  
      print("TEST-3...${driver(
          73, 
          647.875)
      }");
  
      print("TEST-4...${driver(
          74, 
          666.0)
      }");
  
      print("TEST-5...${driver(
          40, 
          190.0)
      }");
  
      print("TEST-6...${driver(
          10, 
          10.0)
      }");
  
      print("TEST-7...${driver(
          94, 
          1081.0)
      }");
  
      print("TEST-8...${driver(
          64, 
          496.0)
      }");
  
      print("TEST-9...${driver(
          16, 
          28.0)
      }");
  
      return 0;
  }
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;
  }