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 pass the sample tests or any test that I give myself, but on attempt I'm timing out.
Locally, when I feed my code with lists containing up to 30k numbers it finishes below 12k ms mark.
Is it possible that here the tests on attempt contain unnecessarily huge lists?
I second this.
There should be a clarification in the description that multiples of both 3 and 5 should be included just once in the sum.
For example, 30 = 5 * 6, but also 30 = 3 * 10. The same is for 15, 45, 60, etc. In the current tests those numbers go once in the sum.
Arghhh bummer, for some reason I was reading it as k being the base and 3 the power.
Thank you @Chrono79.
The cube of 1 is 1. So the largest cube of positive integer smaller than 3 is 1 not 0. Therefore largestPower(3) = 0 is incorect. The same goes for N = 2. In case of N = 1, 0 would be the largest cube smaller than 1.
In the exaplanation of the problem there's an example: largestPower(3) = 0, which I think it's untrue.
It should be largestPower(3) = 1.
This was also in the sample tests Test.assert_equals(largestPower(3), 0) and was making the problem impossible to test. If the same test is run on an attempt I think it would never pass.
Can somone look into this?