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.
I tried in javascript methods slice, splice with the for loop, while loop, but i have the same TimeOut (12000 ms). What's wrong?
Got the same error
Yes, the reference solution for java incorrectly checks for exactly 2 sets of 2 cubes that add up to
n
instead of at least 2 sets of 2 cubes.I think you need to edit task. There were written: sum of two cubes in two different ways. But in fact the wright solution is: two and more different ways
Ok
Your solution crashes for large numbers. Try running it with
n=160000
.Can you help me?
I've got this message in output:
Fatal error in , line 0
Fatal JavaScript invalid size error 169220804
If you have execution timeout, then the solution does not pass, despite of returning correct answers.
See if this paragraph helps.
My solution passed tests, but Execution Timed Out (12000 ms). I used BigInt in the loop for big calculations. What should i do?
did not understand your hint and have used AI
Object.keys
doesn't work on an iterable object ( well, it does, but it doesn't do what you want it to do ). You have to iterate it. Follow the link in the description and read up on the protocol.This question was already answered here.
This comment is hidden because it contains spoiler information about the solution
The first value there is your answer, and you can see there are more than one 0 not at the end. Probably you're mutating the array at the same time you run through it, skipping values.
About what +0 is, you can see that's 0, don't mind the + before it, it's probably chai adding it in the assertion.
I don't understand what is wrong
expected [ 9, +0, 9, 1, 2, 1, 1, 3, 1, 9, +0, +0, 9, +0, +0, +0, +0, +0, +0, +0 ] to deeply equal [ 9, 9, 1, 2, 1, 1, 3, 1, 9, 9, +0, +0, +0, +0, +0, +0, +0, +0, +0, +0 ]
+0 what is this?
I solve it with using integer->string conversions, then without using integer->string conversions. But everytime a have Execution Timed Out (12000 ms)
Loading more items...