title: Number Of Triangles In A Plane If No More Than Two Points Are Collinear
signature: def numberOfTrianglesInAPlaneIfNoMoreThanTwoPointsAreCollinear(n: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        67, 
        47905    
      )}")   
  
  
      println(s"TEST-1...${driver(
        58, 
        30856    
      )}")   
  
  
      println(s"TEST-2...${driver(
        67, 
        47905    
      )}")   
  
  
      println(s"TEST-3...${driver(
        60, 
        34220    
      )}")   
  
  
      println(s"TEST-4...${driver(
        4, 
        4    
      )}")   
  
  
      println(s"TEST-5...${driver(
        97, 
        147440    
      )}")   
  
  
      println(s"TEST-6...${driver(
        9, 
        84    
      )}")   
  
  
      println(s"TEST-7...${driver(
        16, 
        560    
      )}")   
  
  
      println(s"TEST-8...${driver(
        83, 
        91881    
      )}")   
  
  
      println(s"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;
  }