title: Find Sum Modulo K First N Natural Number
signature: fun findSumModuloKFirstNNaturalNumber(n: Int, k: Int): Int {
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, k: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n, k), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(11, 5, 21)
      println("TEST-0...${result}")
      
      result = driver(36, 69, 666)
      println("TEST-1...${result}")
      
      result = driver(71, 28, 876)
      println("TEST-2...${result}")
      
      result = driver(74, 1, 0)
      println("TEST-3...${result}")
      
      result = driver(66, 84, 2211)
      println("TEST-4...${result}")
      
      result = driver(38, 14, 237)
      println("TEST-5...${result}")
      
      result = driver(2, 11, 3)
      println("TEST-6...${result}")
      
      result = driver(73, 87, 2701)
      println("TEST-7...${result}")
      
      result = driver(79, 11, 388)
      println("TEST-8...${result}")
      
      result = driver(30, 55, 465)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def find_sum_modulo_k_first_n_natural_number(N, K):
      ans = 0
      for i in range(1, (N + 1)):
          ans += (i % K)
      return ans
source_cpp: int find_sum_modulo_k_first_n_natural_number(int N, int K) {
    int ans = 0;
    for ( int i = 1;
    i <= N;
    i ++ ) ans += ( i % K );
    return ans;
  }