Hot patato
Условието:
Hot potato is a game in which children form a circle and start passing a hot potato. The counting starts with the first kid. Every nth toss the child left with the potato leaves the game. When a kid leaves the game, it passes the potato along. This continues until there is only one kid left.
Create a program that simulates the game of Hot Potato. Print every kid that is removed from the circle. In the end, print the kid that is left last.
Дава ми 80/100 и не мога да разбера къде ми е грешката:
from collections import deque people = input().split(' ') toss = int(input()) players = deque(people) i = 1 #print (players) while players: person = players.popleft() if i == toss : print(f'Removed {person}') i = 0 if len(players) == 1: print(f'Last is {players.pop()}') break else: players.append(person) i += 1