title: Sum Series 12 32 52 2N 12
signature: sum_series_12_32_52_2n_12 <- 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(
          14L, 
          3654L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          61L, 
          302621L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          37L, 
          67525L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          86L, 
          848046L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          47L, 
          138415L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          98L, 
          1254890L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          70L, 
          457310L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          24L, 
          18424L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          76L, 
          585276L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          24L, 
          18424L
      )))
  
  }
  
  main()
source_py: def sum_series_12_32_52_2n_12(n):
      sum = 0
      for i in range(1, (n + 1)):
          sum = (sum + (((2 * i) - 1) * ((2 * i) - 1)))
      return sum
source_cpp: int sum_series_12_32_52_2n_12(int n) {
    int sum = 0;
    for ( int i = 1;
    i <= n;
    i ++ ) sum = sum + ( 2 * i - 1 ) * ( 2 * i - 1 );
    return sum;
  }