CakeWalk- Runtime ERROR

problem link:

solution link:

Why I am getting runtime error (NZEC)?

Firstly, you have to print Yes and No instead of YES and NO and
for the input:

$ python

You are trying to touch parts of list a, that you are not supposed to

Traceback (most recent call last):
  File "", line 20, in <module>
  File "", line 6, in primefactors
IndexError: list index out of range

You might want to go through the editorial. It can be solved in a simpler way. :slightly_smiling_face:

1 Like