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
Runtime per se won't be a problem here (maybe it is about 0.4ms). The real trouble is, that this ends up in an infinite loop for values above the square closest to INT_MAX.
Well, I feel dumb for not figuring out a fast enough algorithm for this.
I didn't mean to imply or claim anything. I was just wondering, if there was a reason behind it -- like style, code length or readability etc.
There is always something important, but without asking questions you might miss it.
;-)
Thank you very much.
One thing: I don't like that conditional within the loop. One branch is only executed once, so why don't you execute that part/branch outside of the loop?
@rowcased ~ Thanks for the effort. Now it works fine (but sadly the large values are gone).
This comment is hidden because it contains spoiler information about the solution
@rowcased: I disagree. These failed tests (testing large random values) only occur in the C version (well at least not in Python or JavaScript). So maybe there is something wrong with the expected results. It would help, if there was a more specific message (with n and m replaced by actual values). See also my next comment with spoilers...
Thank you as well, now I can mess things up myself.
This comment is hidden because it contains spoiler information about the solution
That's half-hearted.
;-)
If you use a list of precalculated values, why not a list of the final results?
Are you kidding me? Comments on hidden solutions are not hidden?
This comment is hidden because it contains spoiler information about the 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
Loading more items...