title: Maximum Number Of Squares That Can Be Fit In A Right Angle Isosceles Triangle
signature: pub fn maximum_number_of_squares_that_can_be_fit_in_a_right_angle_isosceles_triangle(b: i32, m: i32) -> f64 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: f64, expected: f64)->bool{
  return (actual - expected).abs() < 1e-09
  }
  pub fn driver(b: i32, m: i32, expected: f64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(b, m), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        40, 74, 
        -0.1241782322863404
      ));
      
      println!("TEST-1...{}", driver(
        38, 35, 
        0.04653061224489791
      ));
      
      println!("TEST-2...{}", driver(
        47, 71, 
        -0.11188256298353501
      ));
      
      println!("TEST-3...{}", driver(
        52, 29, 
        0.7110582639714625
      ));
      
      println!("TEST-4...{}", driver(
        21, 9, 
        1.5555555555555558
      ));
      
      println!("TEST-5...{}", driver(
        50, 33, 
        0.3902662993572084
      ));
      
      println!("TEST-6...{}", driver(
        8, 82, 
        -0.04402141582391434
      ));
      
      println!("TEST-7...{}", driver(
        56, 80, 
        -0.10500000000000001
      ));
      
      println!("TEST-8...{}", driver(
        93, 5, 
        163.68000000000004
      ));
      
      println!("TEST-9...{}", 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;
  }