title: Maximum Number Of Squares That Can Be Fit In A Right Angle Isosceles Triangle
signature: fun maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle(b: Int, m: Int): Double {
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.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Double, expected:Double):Boolean{
    return abs(actual - expected) < 1e-09
  }
  fun driver(b: Int, m: Int, expected:Double):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(b, m), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(40, 74, -0.1241782322863404)
      println("TEST-0...${result}")
      
      result = driver(38, 35, 0.04653061224489791)
      println("TEST-1...${result}")
      
      result = driver(47, 71, -0.11188256298353501)
      println("TEST-2...${result}")
      
      result = driver(52, 29, 0.7110582639714625)
      println("TEST-3...${result}")
      
      result = driver(21, 9, 1.5555555555555558)
      println("TEST-4...${result}")
      
      result = driver(50, 33, 0.3902662993572084)
      println("TEST-5...${result}")
      
      result = driver(8, 82, -0.04402141582391434)
      println("TEST-6...${result}")
      
      result = driver(56, 80, -0.10500000000000001)
      println("TEST-7...${result}")
      
      result = driver(93, 5, 163.68000000000004)
      println("TEST-8...${result}")
      
      result = driver(21, 90, -0.08944444444444444)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: maximumNumberOfSquaresThatCanBeFitInARightAngleIsoscelesTriangle
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn