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 reference solution is mostly correct, but it is failing on some values.
The reference solution expects
$37$
for$n = 119065$
. However, there is a way to make it with$36$
ones:In the above, the non-zero numbers can be replaced by the addition of ones. For example,
$4 = (1+1+1+1)$
.Description states that
$-1600 \le r \le 1600$
, however the test cases in Python (and possibly other language) only have positive radii. Possible typo?Haskell translation
Expected and actual are in the wrong order in the sample tests.
Haskell translation
I've modified the description to make it more language agnostic and to address this issue
This comment is hidden because it contains spoiler information about the solution
Haskell translation
Haskell translation
No random tests in Haskell.
Fork with added random tests.
Haskell translation
This solution is fairly inefficient and would fail for start times like
12:00:03
where the clock is still striking from 12:00.No random tests. Fork with added random tests.
Python fork adding random tests.
Haskell translation
Haskell translation
Loading more items...