title: Maximum Number 2X2 Squares Can Fit Inside Right Isosceles Triangle
signature: pub fn maximum_number_2x2_squares_can_fit_inside_right_isosceles_triangle(base_arg0: i32) -> f32 {
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: f32, expected: f32)->bool{
  return (actual - expected).abs() < 1e-06
  }
  pub fn driver(base_arg0: i32, expected: f32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(base_arg0), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        95, 
        1104.375
      ));
      
      println!("TEST-1...{}", driver(
        49, 
        287.875
      ));
      
      println!("TEST-2...{}", driver(
        10, 
        10.0
      ));
      
      println!("TEST-3...{}", driver(
        73, 
        647.875
      ));
      
      println!("TEST-4...{}", driver(
        74, 
        666.0
      ));
      
      println!("TEST-5...{}", driver(
        40, 
        190.0
      ));
      
      println!("TEST-6...{}", driver(
        10, 
        10.0
      ));
      
      println!("TEST-7...{}", driver(
        94, 
        1081.0
      ));
      
      println!("TEST-8...{}", driver(
        64, 
        496.0
      ));
      
      println!("TEST-9...{}", driver(
        16, 
        28.0
      ));
      
  }
source_py: def maximum_number_2x2_squares_can_fit_inside_right_isosceles_triangle(base):
      base = (base - 2)
      base = (base / 2)
      return ((base * (base + 1)) / 2)
source_cpp: int maximum_number_2x2_squares_can_fit_inside_right_isosceles_triangle(int base) {
    base = ( base - 2 );
    base = base / 2;
    return base * ( base + 1 ) / 2;
  }