title: N Th Term Series 2 12 36 80 150
signature: n_th_term_series_2_12_36_80_150 <- 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(
          90L, 
          737100L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          95L, 
          866400L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          22L, 
          11132L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          29L, 
          25230L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          62L, 
          242172L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          40L, 
          65600L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          52L, 
          143312L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          21L, 
          9702L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          33L, 
          37026L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          11L, 
          1452L
      )))
  
  }
  
  main()
source_py: def n_th_term_series_2_12_36_80_150(n):
      return ((n * n) + ((n * n) * n))
source_cpp: int n_th_term_series_2_12_36_80_150(int n) {
    return ( n * n ) + ( n * n * n );
  }