title: Distributing M Items Circle Size N Starting K Th Position
signature: def distributingMItemsCircleSizeNStartingKThPosition(n: Int, m: Int, k: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Int , expected: Int): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(n: Int, m: Int, k: Int, expected: Int): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(n, m, k),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        19, 14, 34, 
        9    
      )}")   
  
  
      println(s"TEST-1...${driver(
        23, 51, 5, 
        9    
      )}")   
  
  
      println(s"TEST-2...${driver(
        92, 10, 24, 
        33    
      )}")   
  
  
      println(s"TEST-3...${driver(
        9, 50, 34, 
        2    
      )}")   
  
  
      println(s"TEST-4...${driver(
        20, 67, 20, 
        6    
      )}")   
  
  
      println(s"TEST-5...${driver(
        68, 25, 40, 
        64    
      )}")   
  
  
      println(s"TEST-6...${driver(
        66, 30, 24, 
        53    
      )}")   
  
  
      println(s"TEST-7...${driver(
        77, 22, 32, 
        53    
      )}")   
  
  
      println(s"TEST-8...${driver(
        90, 1, 71, 
        71    
      )}")   
  
  
      println(s"TEST-9...${driver(
        26, 34, 54, 
        9    
      )}")   
  
  }
  
source_py: def distributing_m_items_circle_size_n_starting_k_th_position(n, m, k):
      if (m <= ((n - k) + 1)):
          return ((m + k) - 1)
      m = (m - ((n - k) + 1))
      if ((m % n) == 0):
          return n
      else:
          return (m % n)
source_cpp: int distributing_m_items_circle_size_n_starting_k_th_position(int n, int m, int k) {
    if ( m <= n - k + 1 ) return m + k - 1;
    m = m - ( n - k + 1 );
    return ( m % n == 0 ) ? n : ( m % n );
  }