You are viewing a single comment's thread. Return to all comments →
Python solution: def saveThePrisoner(n, m, s): return (s + m - 2) % n + 1
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 →
Python solution: def saveThePrisoner(n, m, s): return (s + m - 2) % n + 1