Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- people_in_the_circle = list(map(int, input().split()))
- number_k = int(input())
- people_in_the_suicided = []
- suicided_list = []
- count = 1
- index = 0
- while len(people_in_the_circle) > 0:
- index = (index + number_k - 1) % len(people_in_the_circle)
- suicided_person = people_in_the_circle.pop(index)
- suicided_list.append(str(suicided_person))
- print('[' + ','.join(suicided_list) + ']')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement