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 comment is hidden because it contains spoiler information about the solution
I think you need more secondary / random tests. My first solution passed but gets many wrong. There should be enough tests or a few tests with large numbers to encourage faster solutions.
Please see my other answer, this one is wrong when the most significant digit is two.
I admit this is a terible solution.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Please update the description with the goal of the kata. I am not sure what this is supposed to teach. I learned that you need compiler support to have portable variadic functions.
Don't do this. The return type should be uint64_t.
Thank you for the inforamtion. I knew that multiplying two 32 bit numbers gives you a 64 bit number. I never realized that the product can be larger than INT64_MAX.
I am not sure what makes this work, but I want to.
This comment is hidden because it contains spoiler information about the solution
I checked the solution by running it in the C++ version and it passed. Someone should approve this translation.
Consider changing the Description text to the following:
"""
The password is sent through an electrical wire and has hardware support to decrypt and encrypt the code.
You know that how the encryption works, but you need to figure out the xor value to decrypt the code. You have collected many of the encrypted passwords from a recycle bin and must now figure out the XOR value.
The code, is encrypted in the following way: The code is subdivided into 8 bytes. The each byte is XORed with some value between 0 - 255. Then reverse order of the bytes; change the endianness. Finally, each bit will be sent through a NOT gate; 1's compliment.
For example, if the code is 2. The table below shows the value being subdivided.
"""
The line, "Then reverse order of the byte." initially lead me to believe that you wanted each byte mirrored instead of changing the endianness of the number.
The description says there will only be a max of one robbery per test case. Some of the random test cases have multiple robberies. A solution that does not take into account multiple robberies will not work. Please adjust the test cases so that it will not generate multiple robberies.
Alternativly, adjust the description to allow for multiple robberies and raise the difficulty to lvl 6; managing multiple states between iterations makes it above lvl 7 difficulty.
This comment is hidden because it contains spoiler information about the solution
Loading more items...