• + 0 comments

    def saveThePrisoner(n, m, s):

    m = m - 1
    p = s + m 
    r = p % n 
    
    if r == 0:
        return n
    else:
        return r