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.
2*(1+89)==180
This comment is hidden because it contains spoiler information about the solution
Very good kata. Back to university for a few hours.
D translation
Approved :)
The original kata included two big fixed tests, your solution times out on each of them. It's clearly in the original intention not to allow the most naive solutions to pass the kata. You need to find some optimization. It's not that hard, though.
Whoever does these translations needs to remember that this is a 7kyu. There shouldn't be an insanely large edge case that times out for beginner kyus.
ie. my Python solution passes sample and fixed tests, but not whatever is causing it to timeout in the edge case file.
Must have been something else. After waiting about fifteen minutes and resubmitting the same solution, it no longer times out. Top solution in JS finished in ~7 seconds this time.
I've just tried the 3 top solutions in JS, they pass the attempt tests in about 1 sec.
The top voted solutions in C++ all pass the attempt tests in ~3 seconds (the reference solution is similar to them). All the other languages have been added today and tests have not been changed in any of them.
I attempted the kata in javascript.
Which language are you refering to? The current range of C++ random tests doesn't exceed the bounds of the initial tests. And there are only 10 big tests in C++.
Random tests have been added. Perhaps some older solutions no longer pass.
approved
I think this is maybe already an issue. My initial brute force solution passes most tests but was timing out on the large number tests so I surrendered after struggling to find another way. Tried a few of the top solutions and they all also time out and fail on the large number tests. I'm new at this though so I'm unsure the exact issue.
Loading more items...