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 kata was retired in the meantime, so don't put too much effort in fixing it...
You are right! Sorry for abruptly dismissing your criticism. I have gone and fixed this in the code and updated the test cases.
It seems you are confusing prime factors with factors/divisors. I will update the Kata description to make this distinction more clear.
I'll add some when I figure out how. This is my first published Kata so I am still learning the mechanics. :)
2 is the largest prime factor of 8, not the largest factor. My usage of the term is not wrong. Please see here: https://www.splashlearn.com/math-vocabulary/division/divisor
@PBearson, your solution is wrong, because you need to check prime factors in range(start, end+1), not in range(start, end), because in Python range works as
[start, end)
.no random tests
I think you either mix
factor
withdivisor
, or your calculation is wrong:Let's take
i = 8
however, if I use the largest divisor:
But the 2nd approach fails for your fixed tests 916 and 1521...
why so long?