You are viewing a single comment's thread. Return to all comments →
def nimGame(pile): res = 0 for p in pile: res ^= p return 'Second' if res == 0 else 'First'
Seems like cookies are disabled on this browser, please enable them to open this website
Introduction to Nim Game
You are viewing a single comment's thread. Return to all comments →