title: Maximum Number Of Squares That Can Be Fit In A Right Angle Isosceles Triangle
signature: double maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle(int b, int m) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(double actual, double expected){
      return abs(actual - expected) < 1e-09;
  }
  
  string driver(int b, int m, double expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(b, m), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(40, 74, -0.1241782322863404); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(38, 35, 0.04653061224489791); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(47, 71, -0.11188256298353501); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver(52, 29, 0.7110582639714625); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver(21, 9, 1.5555555555555558); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver(50, 33, 0.3902662993572084); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver(8, 82, -0.04402141582391434); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver(56, 80, -0.10500000000000001); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver(93, 5, 163.68000000000004); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver(21, 90, -0.08944444444444444); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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;
  }