title: Find Sum Modulo K First N Natural Number
signature: function findSumModuloKFirstNNaturalNumber(n, k) {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value) {
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual, expected){
      return convertToString(actual)===convertToString(expected);
  }
  
  function driver(n, k, expected){
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n, k),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(11, 5, 21);
    console.log(`TEST-0...${result}`);
  
    result = driver(36, 69, 666);
    console.log(`TEST-1...${result}`);
  
    result = driver(71, 28, 876);
    console.log(`TEST-2...${result}`);
  
    result = driver(74, 1, 0);
    console.log(`TEST-3...${result}`);
  
    result = driver(66, 84, 2211);
    console.log(`TEST-4...${result}`);
  
    result = driver(38, 14, 237);
    console.log(`TEST-5...${result}`);
  
    result = driver(2, 11, 3);
    console.log(`TEST-6...${result}`);
  
    result = driver(73, 87, 2701);
    console.log(`TEST-7...${result}`);
  
    result = driver(79, 11, 388);
    console.log(`TEST-8...${result}`);
  
    result = driver(30, 55, 465);
    console.log(`TEST-9...${result}`);
  
    process.exit(0);
  };
  
  if (require.main === module) {
    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;
  }