Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = int(input('Введите кол-во игроков '))
- k = int(input('Введите очередность выхода из игры '))
- hit_or_miss = 0
- for i in range(1, N+1):
- hit_or_miss = (hit_or_miss + k) % i
- print(hit_or_miss + 1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement