Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kNum = int(input())
- friends = []
- friendNum = int(0)
- while friendNum < kNum:
- friends.append(friendNum + 1)
- friendNum += 1
- m = int(input())
- roundCount = 1
- while roundCount <= m:
- removal = int(input()) - 1
- i = removal
- while removal <= kNum - 1:
- friends.pop(removal)
- removal += i
- kNum -= 1
- roundCount += 1
- printNum = 0
- while printNum < kNum:
- print(friends[printNum])
- printNum += 1
Advertisement
Add Comment
Please, Sign In to add comment