title: Sum Series 12 32 52 2N 12 1
signature: fun sumSeries1232522N121(n: Int): Int {
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;
  }
question_info.test_list: [{"idx": 0, "outputs": 790244, "inputs": {"n": 84}}, {"idx": 1, "outputs": 540274, "inputs": {"n": 74}}, {"idx": 2, "outputs": 1004731, "inputs": {"n": 91}}, {"idx": 3, "outputs": 52394, "inputs": {"n": 34}}, {"idx": 4, "outputs": 62196, "inputs": {"n": 36}}, {"idx": 5, "outputs": 29260, "inputs": {"n": 28}}, {"idx": 6, "outputs": 457310, "inputs": {"n": 70}}, {"idx": 7, "outputs": 455, "inputs": {"n": 7}}, {"idx": 8, "outputs": 18424, "inputs": {"n": 24}}, {"idx": 9, "outputs": 138415, "inputs": {"n": 47}}]
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:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Int):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(84, 790244)
      println("TEST-0...${result}")
      
      result = driver(74, 540274)
      println("TEST-1...${result}")
      
      result = driver(91, 1004731)
      println("TEST-2...${result}")
      
      result = driver(34, 52394)
      println("TEST-3...${result}")
      
      result = driver(36, 62196)
      println("TEST-4...${result}")
      
      result = driver(28, 29260)
      println("TEST-5...${result}")
      
      result = driver(70, 457310)
      println("TEST-6...${result}")
      
      result = driver(7, 455)
      println("TEST-7...${result}")
      
      result = driver(24, 18424)
      println("TEST-8...${result}")
      
      result = driver(47, 138415)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: sumSeries1232522N121
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn