title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: class Solution {
  
      public Float maximumNumber2X2SquaresCanFitInsideRightIsoscelesTriangle(Integer base_arg0) {
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;
  }
question_info.extension: java
question_info.entry_fn_name: maximumNumber2X2SquaresCanFitInsideRightIsoscelesTriangle
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 1104.375, "inputs": {"base_arg0": 95}}, {"idx": 1, "outputs": 287.875, "inputs": {"base_arg0": 49}}, {"idx": 2, "outputs": 10.0, "inputs": {"base_arg0": 10}}, {"idx": 3, "outputs": 647.875, "inputs": {"base_arg0": 73}}, {"idx": 4, "outputs": 666.0, "inputs": {"base_arg0": 74}}, {"idx": 5, "outputs": 190.0, "inputs": {"base_arg0": 40}}, {"idx": 6, "outputs": 10.0, "inputs": {"base_arg0": 10}}, {"idx": 7, "outputs": 1081.0, "inputs": {"base_arg0": 94}}, {"idx": 8, "outputs": 496.0, "inputs": {"base_arg0": 64}}, {"idx": 9, "outputs": 28.0, "inputs": {"base_arg0": 16}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer base_arg0, Float expected){
          try{
              Driver driver = new Driver();
              if (driver.run(base_arg0,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(95, 1104.375f);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(49, 287.875f);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(10, 10.0f);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(73, 647.875f);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(74, 666.0f);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(40, 190.0f);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(10, 10.0f);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(94, 1081.0f);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(64, 496.0f);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(16, 28.0f);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer base_arg0, Float expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(base_arg0),expected);
      }
      
      public boolean validateSolution(Float actual, Float expected){
          return Math.abs(actual - expected) < 1e-06f;
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__