title: Sum Binomial Coefficients
signature: fun sumBinomialCoefficients(n: Int): Long {
source_py: def sum_binomial_coefficients(n):
      C = [([0] * (n + 2)) for i in range(0, (n + 2))]
      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 += C[n][i]
      return sum
source_cpp: int sum_binomial_coefficients(int n) {
    int C [ n + 1 ] [ n + 1 ];
    for ( int i = 0;
    i <= n;
    i ++ ) {
      for ( int 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 ];
    return sum;
  }
question_info.test_list: [{"idx": 0, "outputs": 256, "inputs": {"n": 8}}, {"idx": 1, "outputs": 549755813888, "inputs": {"n": 39}}, {"idx": 2, "outputs": 33554432, "inputs": {"n": 25}}, {"idx": 3, "outputs": 17592186044416, "inputs": {"n": 44}}, {"idx": 4, "outputs": 64, "inputs": {"n": 6}}, {"idx": 5, "outputs": 281474976710656, "inputs": {"n": 48}}, {"idx": 6, "outputs": 549755813888, "inputs": {"n": 39}}]
question_info.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Long, expected:Long):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Long):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(8, 256)
      println("TEST-0...${result}")
      
      result = driver(39, 549755813888)
      println("TEST-1...${result}")
      
      result = driver(25, 33554432)
      println("TEST-2...${result}")
      
      result = driver(44, 17592186044416)
      println("TEST-3...${result}")
      
      result = driver(6, 64)
      println("TEST-4...${result}")
      
      result = driver(48, 281474976710656)
      println("TEST-5...${result}")
      
      result = driver(39, 549755813888)
      println("TEST-6...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: sumBinomialCoefficients
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn