You are viewing a single comment's thread. Return to all comments →
def misereNim(s): if all(x == 1 for x in s): if len(s) % 2 == 1: return "Second" else: return "First" else: balance = 0 for val in s: balance ^= val if balance == 0: return "Second" else: return "First"
Seems like cookies are disabled on this browser, please enable them to open this website
Misère Nim
You are viewing a single comment's thread. Return to all comments →