Simulate, keep track of visited with set, 79% speed
image.png\n\n\n# Code\n\nclass Solution:\n    def circularGameLosers(self, n: int, k: int) -> List[int]:\n        pos, i = 0, 1\n        visited = {pos}\n      
image.png\n![image.png](https://assets.leetcode.com/users/images/e5245933-d4e7-4380-abf4-7dd34ac2758a_1713262114.3563592.png)\n\n# Code\n```\nclass Solution:\n    def circularGameLosers(self, n: int, k: int) -> List[int]:\n        pos, i = 0, 1\n        visited = {pos}\n        while True:\n            new_pos = (pos + i * k) % n\n            if new_pos in visited:\n                break\n            visited.add(new_pos)\n            pos = new_pos\n            i += 1\n        return [j + 1 for j in range(n) if j not in visited]\n```
['Python3']