I am trying to get through the Array Filling problem of August Long Challenge, but something seems to be wrong with my code. On submission, the result which is coming is a Runtime Error, and I think the problem might actually be in my Euclidean GCD method. Can anyone go through it in my code and let me know what is it?
My submission :