title: Sum Squares Binomial Coefficients
signature: func sumSquaresBinomialCoefficients(n int) int64 {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int64, expected int64) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(n int, expected int64) string {
      if validateSolution(PLACEHOLDER_FN_NAME(n),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(19, 35345263800)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(24, 32247603683100)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(22, 2104098963720)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(15, 155117520)
      fmt.Printf("TEST-3...%s\n", result)
      
          
  }
source_py: def sum_squares_binomial_coefficients(n):
      C = [[0 for i in range((n + 1))] for j in range((n + 1))]
      for i in range(0, (n + 1)):
          for j in range(0, (min(i, n) + 1)):
              if ((j == 0) or (j == i)):
                  C[i][j] = 1
              else:
                  C[i][j] = (C[(i - 1)][(j - 1)] + C[(i - 1)][j])
      sum = 0
      for i in range(0, (n + 1)):
          sum = (sum + (C[n][i] * C[n][i]))
      return sum
source_cpp: int sum_squares_binomial_coefficients(int n) {
    int C [ n + 1 ] [ n + 1 ];
    int i, j;
    for ( i = 0;
    i <= n;
    i ++ ) {
      for ( j = 0;
      j <= min ( i, n );
      j ++ ) {
        if ( j == 0 || j == i ) C [ i ] [ j ] = 1;
        else C [ i ] [ j ] = C [ i - 1 ] [ j - 1 ] + C [ i - 1 ] [ j ];
      }
    }
    int sum = 0;
    for ( int i = 0;
    i <= n;
    i ++ ) sum += ( C [ n ] [ i ] * C [ n ] [ i ] );
    return sum;
  }