title: Probability Three Randomly Chosen Numbers Ap
signature: pub fn probability_three_randomly_chosen_numbers_ap(n: 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(n: i32, expected: f64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        46, 
        0.0163062743707905
      ));
      
      println!("TEST-1...{}", driver(
        5, 
        0.15151515151515152
      ));
      
      println!("TEST-2...{}", driver(
        44, 
        0.017047655947307245
      ));
      
      println!("TEST-3...{}", driver(
        15, 
        0.05005561735261402
      ));
      
      println!("TEST-4...{}", driver(
        72, 
        0.010417169037858692
      ));
      
      println!("TEST-5...{}", driver(
        2, 
        0.4
      ));
      
      println!("TEST-6...{}", driver(
        86, 
        0.008721225027887637
      ));
      
      println!("TEST-7...{}", driver(
        17, 
        0.04415584415584416
      ));
      
      println!("TEST-8...{}", driver(
        30, 
        0.025006946373992776
      ));
      
      println!("TEST-9...{}", driver(
        42, 
        0.01785967399007796
      ));
      
  }
source_py: def probability_three_randomly_chosen_numbers_ap(n):
      return ((3.0 * n) / ((4.0 * (n * n)) - 1))
source_cpp: double probability_three_randomly_chosen_numbers_ap(int n) {
    return ( 3.0 * n ) / ( 4.0 * ( n * n ) - 1 );
  }