You are viewing a single comment's thread. Return to all comments →
def saveThePrisoner(n, m, s): baseCandies = (m-1)%n res = s + baseCandies if res > n: return (res)%n return res
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 →
Python3 Solution: