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.
krishp, 6 years ago
/
was integer division in Python 2.7.I know that this is 6 years late, but your submission is correct and passes all the test cases. The reason it was failing was because in line 7 you have prime_factors(n/i). Since for loops require integers, if you change this to prime_factors(n//i) it passes everything.
This comment is hidden because it contains spoiler information about the solution
Agreed. This kata could be improved by prohibiting use of str.endswith().
Yeah!, You're right. I did't see that situtation. Well, the tests will be better..
Hmm. Good point. Perhaps
ball_type
orballType
would have been better. :-/Your code is good - but because of its recursive nature, it is probably timing out for
one of the tests (value of > 1000000).
Agree with your point about floating point calculations missing 90 degrees. Judging from the test cases, which supplied floating point arguments, that could happen with any function that performs an equality check for exact values.
Fortunately, the test cases did not trigger such a scenario with my solution.