title: Triangular Matchstick Number
signature: pub fn triangular_matchstick_number(x: 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(x: i32, expected: f32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(x), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        6, 
        63.0
      ));
      
      println!("TEST-1...{}", driver(
        25, 
        975.0
      ));
      
      println!("TEST-2...{}", driver(
        15, 
        360.0
      ));
      
      println!("TEST-3...{}", driver(
        30, 
        1395.0
      ));
      
      println!("TEST-4...{}", driver(
        17, 
        459.0
      ));
      
      println!("TEST-5...{}", driver(
        80, 
        9720.0
      ));
      
      println!("TEST-6...{}", driver(
        27, 
        1134.0
      ));
      
      println!("TEST-7...{}", driver(
        13, 
        273.0
      ));
      
      println!("TEST-8...{}", driver(
        12, 
        234.0
      ));
      
      println!("TEST-9...{}", driver(
        67, 
        6834.0
      ));
      
  }
source_py: def triangular_matchstick_number(x):
      return (((3 * x) * (x + 1)) / 2)
source_cpp: int triangular_matchstick_number(int x) {
    return ( 3 * x * ( x + 1 ) ) / 2;
  }