2682. Find the Losers of the Circular Game
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution(object):\n    def circularGameLosers(self, n, k):\n        """\n        :type n: int\n        :type k: int\n        :rtype: List[int]\n        """\n        visited = set()\n        curr = 0\n        s = 1\n        visited.add(0)\n        while True:\n            curr = (curr + s * k) % n\n            if curr in visited:\n                break\n            visited.add(curr)\n            s += 1\n        \n        # Convert from 0-based index to 1-based index\n        visited = {x + 1 for x in visited}\n        \n        # All friends who did not receive the ball\n        losers = [i for i in range(1, n + 1) if i not in visited]\n        \n        return sorted(losers)\n\n     \n        \n```
['Python']