title: Find Sum Modulo K First N Natural Number
signature: find_sum_modulo_k_first_n_natural_number <- function(n, k) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, k, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n, k), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          11L, 5L, 
          21L
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          36L, 69L, 
          666L
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          71L, 28L, 
          876L
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          74L, 1L, 
          0L
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          66L, 84L, 
          2211L
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          38L, 14L, 
          237L
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          2L, 11L, 
          3L
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          73L, 87L, 
          2701L
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          79L, 11L, 
          388L
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          30L, 55L, 
          465L
      )))
  
  }
  
  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;
  }