Просто лучший
Code
![image.png](https://assets.leetcode.com/users/images/a4290454-1181-4104-99ff-a86d7b32211a_1736337490.4797738.png)



# Code
```kotlin []
class Solution {
    fun circularGameLosers(n: Int, k: Int): IntArray {
        val used = BooleanArray(n)
        var index = 0
        var coef = 1
        while(!used[index]){
            used[index] = true
            index = (index + k * coef++) % used.size
        }
        val result = IntArray(used.count { !it })
        var pointer = 0
        used.forEachIndexed{ i, value ->
            if(!value)
                result[pointer++] = i + 1
        }
        return result
    }
}
```
['Kotlin']