title: Find Sum Modulo K First N Natural Number
signature: class Solution {
  
      public Integer findSumModuloKFirstNNaturalNumber(Integer n, Integer k) {
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;
  }
question_info.extension: java
question_info.entry_fn_name: findSumModuloKFirstNNaturalNumber
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 21, "inputs": {"n": 11, "k": 5}}, {"idx": 1, "outputs": 666, "inputs": {"n": 36, "k": 69}}, {"idx": 2, "outputs": 876, "inputs": {"n": 71, "k": 28}}, {"idx": 3, "outputs": 0, "inputs": {"n": 74, "k": 1}}, {"idx": 4, "outputs": 2211, "inputs": {"n": 66, "k": 84}}, {"idx": 5, "outputs": 237, "inputs": {"n": 38, "k": 14}}, {"idx": 6, "outputs": 3, "inputs": {"n": 2, "k": 11}}, {"idx": 7, "outputs": 2701, "inputs": {"n": 73, "k": 87}}, {"idx": 8, "outputs": 388, "inputs": {"n": 79, "k": 11}}, {"idx": 9, "outputs": 465, "inputs": {"n": 30, "k": 55}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Integer k, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n, k,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(11, 5, 21);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(36, 69, 666);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(71, 28, 876);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(74, 1, 0);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(66, 84, 2211);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(38, 14, 237);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(2, 11, 3);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(73, 87, 2701);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(79, 11, 388);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(30, 55, 465);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Integer k, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n, k),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__