You are viewing a single comment's thread. Return to all comments →
all you have to do is count the number of set bits, and the number of zeroes on the end less one.
n = bin(n)[2:]
n = n.split('1')
turns = len(n)+len(n[-1])-2
return 'Louise' if turns&1 else 'Richard'