title: Maximum Number Of Squares That Can Be Fit In A Right Angle Isosceles Triangle
signature: function maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle(b: number, m: number): number {
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;
  }
question_info.test_list: [{"idx": 0, "outputs": -0.1241782322863404, "inputs": {"b": 40, "m": 74}}, {"idx": 1, "outputs": 0.04653061224489791, "inputs": {"b": 38, "m": 35}}, {"idx": 2, "outputs": -0.11188256298353501, "inputs": {"b": 47, "m": 71}}, {"idx": 3, "outputs": 0.7110582639714625, "inputs": {"b": 52, "m": 29}}, {"idx": 4, "outputs": 1.5555555555555558, "inputs": {"b": 21, "m": 9}}, {"idx": 5, "outputs": 0.3902662993572084, "inputs": {"b": 50, "m": 33}}, {"idx": 6, "outputs": -0.04402141582391434, "inputs": {"b": 8, "m": 82}}, {"idx": 7, "outputs": -0.10500000000000001, "inputs": {"b": 56, "m": 80}}, {"idx": 8, "outputs": 163.68000000000004, "inputs": {"b": 93, "m": 5}}, {"idx": 9, "outputs": -0.08944444444444444, "inputs": {"b": 21, "m": 90}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return Math.abs(actual - expected) < 1e-09;
  }
  
  function driver(b: number, m: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(b, m),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(40, 74, -0.1241782322863404);
    console.log(`TEST-0...${result}`);
  
    result = driver(38, 35, 0.04653061224489791);
    console.log(`TEST-1...${result}`);
  
    result = driver(47, 71, -0.11188256298353501);
    console.log(`TEST-2...${result}`);
  
    result = driver(52, 29, 0.7110582639714625);
    console.log(`TEST-3...${result}`);
  
    result = driver(21, 9, 1.5555555555555558);
    console.log(`TEST-4...${result}`);
  
    result = driver(50, 33, 0.3902662993572084);
    console.log(`TEST-5...${result}`);
  
    result = driver(8, 82, -0.04402141582391434);
    console.log(`TEST-6...${result}`);
  
    result = driver(56, 80, -0.10500000000000001);
    console.log(`TEST-7...${result}`);
  
    result = driver(93, 5, 163.68000000000004);
    console.log(`TEST-8...${result}`);
  
    result = driver(21, 90, -0.08944444444444444);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js