title: Distributing M Items Circle Size N Starting K Th Position
signature: distributingMItemsCircleSizeNStartingKThPosition :: Integer -> Integer -> Integer -> Integer
  distributingMItemsCircleSizeNStartingKThPosition n m k = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> Integer -> Integer -> String
  driver n m k expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n m k) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (19) (14) (34) (9) )
  
      printf "TEST-1...%s\n" (driver (23) (51) (5) (9) )
  
      printf "TEST-2...%s\n" (driver (92) (10) (24) (33) )
  
      printf "TEST-3...%s\n" (driver (9) (50) (34) (2) )
  
      printf "TEST-4...%s\n" (driver (20) (67) (20) (6) )
  
      printf "TEST-5...%s\n" (driver (68) (25) (40) (64) )
  
      printf "TEST-6...%s\n" (driver (66) (30) (24) (53) )
  
      printf "TEST-7...%s\n" (driver (77) (22) (32) (53) )
  
      printf "TEST-8...%s\n" (driver (90) (1) (71) (71) )
  
      printf "TEST-9...%s\n" (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 );
  }