title: Maximum Number Of Squares That Can Be Fit In A Right Angle Isosceles Triangle
signature: maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle :: Integer -> Integer -> Double
  maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle b m = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Double -> Double -> Bool
  validateSolution actual expected = do
      (abs (actual-expected)) < 1e-09
  
  driver :: Integer -> Integer -> Double -> String
  driver b m expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME b m) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (40) (74) (-0.1241782322863404) )
  
      printf "TEST-1...%s\n" (driver (38) (35) (0.04653061224489791) )
  
      printf "TEST-2...%s\n" (driver (47) (71) (-0.11188256298353501) )
  
      printf "TEST-3...%s\n" (driver (52) (29) (0.7110582639714625) )
  
      printf "TEST-4...%s\n" (driver (21) (9) (1.5555555555555558) )
  
      printf "TEST-5...%s\n" (driver (50) (33) (0.3902662993572084) )
  
      printf "TEST-6...%s\n" (driver (8) (82) (-0.04402141582391434) )
  
      printf "TEST-7...%s\n" (driver (56) (80) (-0.10500000000000001) )
  
      printf "TEST-8...%s\n" (driver (93) (5) (163.68000000000004) )
  
      printf "TEST-9...%s\n" (driver (21) (90) (-0.08944444444444444) )
  
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;
  }