title: Maximum Number Of Squares That Can Be Fit In A Right Angle Isosceles Triangle
signature: class Solution {
  
      public Double maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle(Integer b, Integer m) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer b, Integer m, Double expected){
          try{
              Driver driver = new Driver();
              if (driver.run(b, m,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(40, 74, -0.1241782322863404);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(38, 35, 0.04653061224489791);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(47, 71, -0.11188256298353501);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(52, 29, 0.7110582639714625);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(21, 9, 1.5555555555555558);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(50, 33, 0.3902662993572084);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(8, 82, -0.04402141582391434);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(56, 80, -0.10500000000000001);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(93, 5, 163.68000000000004);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(21, 90, -0.08944444444444444);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer b, Integer m, Double expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(b, m),expected);
      }
      
      public boolean validateSolution(Double actual, Double expected){
          return Math.abs(actual - expected) < 1e-09;
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
source_py: def maximum_number_of_squares_that_can_be_fit_in_a_right_angle_isosceles_triangle(b, m):
      return ((((b / m) - 1) * (b / m)) / 2)
source_cpp: int maximum_number_of_squares_that_can_be_fit_in_a_right_angle_isosceles_triangle(int b, int m) {
    return ( b / m - 1 ) * ( b / m ) / 2;
  }