Counter game

  • + 0 comments
    def counterGame(n):
        return 'Richard' if (n.bit_count() + bin(n)[::-1].index('1')) & 1 else 'Louise'