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
Yup, easy to understand but far slower than a simple loop in this case, particularly because of the function chaining.
This comment is hidden because it contains spoiler information about the solution
This solution is too slow and probably times out. Values of r in excess of 1 million are used in tests. Modifying the original array will not work. Need to figure the array index for any given r. I solved it by writing out the results for R from 1 to 35 and looking at the sequence. It has something to do with powers of 2.