title: Sum K Th Group Odd Positive Numbers
signature: pub fn sum_k_th_group_odd_positive_numbers(k: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(k: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(k), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        91, 
        753571
      ));
      
      println!("TEST-1...{}", driver(
        52, 
        140608
      ));
      
      println!("TEST-2...{}", driver(
        78, 
        474552
      ));
      
      println!("TEST-3...{}", driver(
        51, 
        132651
      ));
      
      println!("TEST-4...{}", driver(
        65, 
        274625
      ));
      
      println!("TEST-5...{}", driver(
        39, 
        59319
      ));
      
      println!("TEST-6...{}", driver(
        42, 
        74088
      ));
      
      println!("TEST-7...{}", driver(
        12, 
        1728
      ));
      
      println!("TEST-8...{}", driver(
        56, 
        175616
      ));
      
      println!("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;
  }