You are viewing a single comment's thread. Return to all comments →
Here is my one line Python solution!
def saveThePrisoner(n, m, s): return (m + s - 1) % n if (m + s - 1) % n != 0 else n
Seems like cookies are disabled on this browser, please enable them to open this website
Save the Prisoner!
You are viewing a single comment's thread. Return to all comments →
Here is my one line Python solution!