title: Nth Pentagonal Number
signature: pub fn nth_pentagonal_number(n: 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(n: i32, expected: f32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        96, 
        13776.0
      ));
      
      println!("TEST-1...{}", driver(
        93, 
        12927.0
      ));
      
      println!("TEST-2...{}", driver(
        15, 
        330.0
      ));
      
      println!("TEST-3...{}", driver(
        8, 
        92.0
      ));
      
      println!("TEST-4...{}", driver(
        21, 
        651.0
      ));
      
      println!("TEST-5...{}", driver(
        14, 
        287.0
      ));
      
      println!("TEST-6...{}", driver(
        11, 
        176.0
      ));
      
      println!("TEST-7...{}", driver(
        79, 
        9322.0
      ));
      
      println!("TEST-8...{}", driver(
        24, 
        852.0
      ));
      
      println!("TEST-9...{}", driver(
        94, 
        13207.0
      ));
      
  }
source_py: def nth_pentagonal_number(n):
      return ((((3 * n) * n) - n) / 2)
source_cpp: int nth_pentagonal_number(int n) {
    return ( 3 * n * n - n ) / 2;
  }