train
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```cpp []\nclass Solution {\npublic:\n    vector<int> circularGameLosers(int n, int k) {\n        vector<int> test;   //\u043C\u0430\u0441\u0441\u0438\u0432 \u0434\u043B\u044F \u043E\u0431\u043E\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E \u043A\u0430\u043A\u0438\u043C \u0438\u0433\u0440\u043E\u043A\u0430\u043C \u0437\u0430\u0448\u043B\u0438 \u043F\u043E \u043A\u0430\u043A\u0438\u043C \u043D\u0435\u0442 1 - \u0431\u044B\u043B, 0 - \u043D\u0435 \u0431\u044B\u043B\n        for (int i = 0; i < n; i++){\n            test.push_back(0);\n        }\n        int index = 0;\n        test[index] = 1;\n\n        for (int loop = 1; ;loop++){\n            int step = loop * k;\n            for (int i = 0; i < step; i++){\n                if (index == n-1){      //\u043A\u0430\u043A \u0434\u043E\u0448\u043B\u0438 \u0434\u043E \u043A\u043E\u043D\u0446\u0430 \u0438\u0434\u0435\u043C \u0441\u043D\u043E\u0432\u0430 \u043F\u043E \u043A\u0440\u0443\u0433\u0443\n                    index = 0;\n                }\n                else{\n                    index++;\n                }\n            }\n            if (test[index] == 0){  //\u0435\u0441\u043B\u0438 \u0443 \u0438\u0433\u0440\u043E\u043A\u0430 \u043D\u0435 \u0431\u044B\u043B\u043E \u043C\u044F\u0447\u0430\n                test[index] = 1;\n            }\n            else{\n                break;  //\u0435\u0441\u043B\u0438 \u0431\u044B\u043B - \u0432\u044B\u0445\u043E\u0434\u0438\u043C\n            }\n        }\n        vector<int> res;\n        for (int i = 0; i < n; i++){\n            if (test[i] == 0){\n                res.push_back(i+1); //\u0437\u0430\u0441\u043E\u0432\u044B\u0432\u0430\u0435\u043C \u0432 \u043E\u0442\u0432\u0435\u0442 \u0442\u0435\u0445 \u0443 \u043A\u043E\u0433\u043E \u043D\u0435 \u0431\u044B\u043B\u043E \u043C\u044F\u0447\u0430\n            }\n        }\n        \n        return res;\n    }\n};\n
['C++']