title: Sum Series 12 32 52 2N 12 1
signature: sumSeries1232522N121(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(
          84, 
          790244)
      }");
  
      print("TEST-1...${driver(
          74, 
          540274)
      }");
  
      print("TEST-2...${driver(
          91, 
          1004731)
      }");
  
      print("TEST-3...${driver(
          34, 
          52394)
      }");
  
      print("TEST-4...${driver(
          36, 
          62196)
      }");
  
      print("TEST-5...${driver(
          28, 
          29260)
      }");
  
      print("TEST-6...${driver(
          70, 
          457310)
      }");
  
      print("TEST-7...${driver(
          7, 
          455)
      }");
  
      print("TEST-8...${driver(
          24, 
          18424)
      }");
  
      print("TEST-9...${driver(
          47, 
          138415)
      }");
  
      return 0;
  }
source_py: def sum_series_12_32_52_2n_12_1(n):
      return int((((n * ((2 * n) - 1)) * ((2 * n) + 1)) / 3))
source_cpp: int sum_series_12_32_52_2n_12_1(int n) {
    return ( n * ( 2 * n - 1 ) * ( 2 * n + 1 ) ) / 3;
  }