Java translation (author inactive)
This comment is hidden because it contains spoiler information about the solution
Crystal translation (author inactive)
I see this has been approved ✔️
No random tests (at least in Ruby)
Lua translation kumited! Can you review and approve, please? :)
When you perform the & binary operation on 1, you get the least significant binary digit of the number. If that number is even, the digit will be zero, otherwise it will be one.
It looks a clever solution but I cannot figure it out how it works..