title: Number Of Triangles In A Plane If No More Than Two Points Are Collinear
signature: number_of_triangles_in_a_plane_if_no_more_than_two_points_are_collinear <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          67L, 
          47905L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          58L, 
          30856L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          67L, 
          47905L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          60L, 
          34220L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          4L, 
          4L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          97L, 
          147440L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          9L, 
          84L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          16L, 
          560L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          83L, 
          91881L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          87L, 
          105995L
      )))
  
  }
  
  main()
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;
  }