function saveThePrisoner(n, m, s) {
console.log((m-1 + s) % n)
return (m-1 + s)%n || n;
}
saveThePrisoner(3, 1, 2);
For further actions, you may consider blocking this person and/or reporting abuse
function saveThePrisoner(n, m, s) {
console.log((m-1 + s) % n)
return (m-1 + s)%n || n;
}
saveThePrisoner(3, 1, 2);
For further actions, you may consider blocking this person and/or reporting abuse
JK Paper -
Jobspikr -
Vaunt -
Olawale Adepoju -
Top comments (0)