title: Sum K Th Group Odd Positive Numbers
signature: def sumKThGroupOddPositiveNumbers(k: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(k: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(k),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        91, 
        753571    
      )}")   
  
  
      println(s"TEST-1...${driver(
        52, 
        140608    
      )}")   
  
  
      println(s"TEST-2...${driver(
        78, 
        474552    
      )}")   
  
  
      println(s"TEST-3...${driver(
        51, 
        132651    
      )}")   
  
  
      println(s"TEST-4...${driver(
        65, 
        274625    
      )}")   
  
  
      println(s"TEST-5...${driver(
        39, 
        59319    
      )}")   
  
  
      println(s"TEST-6...${driver(
        42, 
        74088    
      )}")   
  
  
      println(s"TEST-7...${driver(
        12, 
        1728    
      )}")   
  
  
      println(s"TEST-8...${driver(
        56, 
        175616    
      )}")   
  
  
      println(s"TEST-9...${driver(
        98, 
        941192    
      )}")   
  
  }
  
source_py: def sum_k_th_group_odd_positive_numbers(k):
      cur = int(((k * (k - 1)) + 1))
      sum = 0
      while k:
          sum += cur
          cur += 2
          k = (k - 1)
      return sum
source_cpp: int sum_k_th_group_odd_positive_numbers(int k) {
    int cur = ( k * ( k - 1 ) ) + 1;
    int sum = 0;
    while ( k -- ) {
      sum += cur;
      cur += 2;
    }
    return sum;
  }