title: Sum Series 12 32 52 2N 12
signature: sumSeries1232522N12(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          14, 
          3654)
      }");
  
      print("TEST-1...${driver(
          61, 
          302621)
      }");
  
      print("TEST-2...${driver(
          37, 
          67525)
      }");
  
      print("TEST-3...${driver(
          86, 
          848046)
      }");
  
      print("TEST-4...${driver(
          47, 
          138415)
      }");
  
      print("TEST-5...${driver(
          98, 
          1254890)
      }");
  
      print("TEST-6...${driver(
          70, 
          457310)
      }");
  
      print("TEST-7...${driver(
          24, 
          18424)
      }");
  
      print("TEST-8...${driver(
          76, 
          585276)
      }");
  
      print("TEST-9...${driver(
          24, 
          18424)
      }");
  
      return 0;
  }
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;
  }