Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This is not my solution - my solution (submitted) is somewhat different. I found it online as a model solution and merely wanted to see whether it would pass the tests. As it happens, the first test returned an error, and I pressed 'submit' by mistake. It is very frustrating not to be able to delete a solution that has been submitted inadvertently. If a moderator could remove this solution, that'd be helpful.
Yeah, U are right
This code may work incorrectlly on some inputs.
For example:
This happens because bitwise operations convert it arguments to 32-bit integers. In this example binary representation of number in str is more than 32 bit, therefore it is truncated.
So you should use this code only, if you are sure, that all numbers that you pass in your function fit 32-bit.
Why make programing so difficult ?? Have fun have your life