Jan-19-2018, 04:05 PM
(Jan-19-2018, 03:40 PM)sparkz_alot Wrote: Please post the error code, in it's entirety, between the error tags. This helps in determining where the problem lies.
Error:123
3
41
Traceback (most recent call last):
File "/home/atharva/PycharmProjects/untitled/ad.py", line 17, in <module>
if(x%k[p]==0):
IndexError: list index out of range
This was the error, but I sorted it by using for p in range (0,len(k)):at line 16.
The optimisation problem still persists.
If I enter something like 12212, I get an answer. But something like 600851475143 just takes too long(still running) that number is the problem input. Thanks for the reply.