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.
thanks a lot!
I tried to do something similar,
Briliant :) smartes evever . Everyone try iterate and caluclate and there is the betyfull bitwise
<<
is bitwise shift left; that's basically multiplying by the powers of 2:<< 1
==* 2**1
==* 2
<< 8
==* 2**8
==* 256
Similarly,
>>
is bitwise shift right; which is (floor)dividing by the powers of 2:>> 1
==// 2**1
==// 2
>> 8
==// 2**8
==// 256
I like the simplicity of the solution. It's a rare case where using "magic numbers" and manually writing out each of the possibilities (instead of a loop) is actually okay and still quite readable.
One small suggestion: consider using bitwise | instead of +=. I think the result would be just as readable.
I tried to find where in the kata is the issue you are trying to mark here, but failed. Every mention of (2^200) ^ (2^300) results in 6 as the last digit. Can you please clarify what needs to be corrected? Or if there is no mistake anywhere in the kata, please check this issue as resolved.
Update: Okay, I think I found and corrected it (it was in Python-specific examples). Please mark this as resolved if satisfied.
This comment is hidden because it contains spoiler information about the solution