Bitwise And Hackerrank Solution In Java