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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
There is more than one thing wrong with your code. Most of them should be pretty clear when going through the code in a debugger, step by step. Did you try to inspect your code in your local IDE?
You need a better algorithm than what you have now. Counting all factors is a very bad approach, and, on top of that, your implementation of counting all factors is very, very slow.Switching between loops and lists and comprehensions and generators is not going to help if you stick to your current algorithm.
Generally speaking, this is about code efficiency. There may remain something about how you optomize that has not yet occurred to you.