# An obvious solution is to convert a number into a binary and then to convert it into a string and then to check a particular idx, but it feels like it's easier way