You are viewing a single comment's thread. Return to all comments →
function saveThePrisoner(n, m, s) { let pos = s + (m % n) - 1; return (pos == 0 || pos > n) ? Math.abs(pos - n) : pos; }
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 →