• + 2 comments

    I understood the logic and wrote a one liner to solve the problem. Here's the code:

    print('Richard') if str(bin(int(input())-1)).count('1')%2 == 0 else print('Louise')
    

    Thanks a lot for explaining the logic nicely! :)