📅  最后修改于: 2022-03-11 15:02:32.955000             🧑  作者: Mango
// save the prisoner hackerrank solution in javascript
function saveThePrisoner(n, m, s) {
// Write your code here
let last = 0;
last = (m + s - 1) % n;
if (last === 0) {
last = n;
}
return last;
}