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.
The test quality is poor; it's 50 random tests of
n < 1e6
along withn = 0, 1, 1e8
. The original code can pass the tests once it returns the correct answer forn = 1e8
without trying to compute it.But then bumping the input range of random tests will also cause timeouts. Not even the faster solution finishes all the tests if the 50 random tests are bumped to
n < 1e7
.10e6
and10**6
( and same for 8 ) are not the same thing.