title: Number Of Triangles In A Plane If No More Than Two Points Are Collinear
signature: pub fn number_of_triangles_in_a_plane_if_no_more_than_two_points_are_collinear(n: i32) -> i32 {
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: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        67, 
        47905
      ));
      
      println!("TEST-1...{}", driver(
        58, 
        30856
      ));
      
      println!("TEST-2...{}", driver(
        67, 
        47905
      ));
      
      println!("TEST-3...{}", driver(
        60, 
        34220
      ));
      
      println!("TEST-4...{}", driver(
        4, 
        4
      ));
      
      println!("TEST-5...{}", driver(
        97, 
        147440
      ));
      
      println!("TEST-6...{}", driver(
        9, 
        84
      ));
      
      println!("TEST-7...{}", driver(
        16, 
        560
      ));
      
      println!("TEST-8...{}", driver(
        83, 
        91881
      ));
      
      println!("TEST-9...{}", driver(
        87, 
        105995
      ));
      
  }
source_py: def number_of_triangles_in_a_plane_if_no_more_than_two_points_are_collinear(n):
      return (((n * (n - 1)) * (n - 2)) // 6)
source_cpp: int number_of_triangles_in_a_plane_if_no_more_than_two_points_are_collinear(int n) {
    return n * ( n - 1 ) * ( n - 2 ) / 6;
  }