You are viewing a single comment's thread. Return to all comments →
if((m+s-1)%n)
return (m+s-1)%n;
else
return n;
this works fine!if you wish you can apply this logic
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 →
if((m+s-1)%n)
return (m+s-1)%n;
else
return n;
this works fine!if you wish you can apply this logic