Getting source limit error in this question .
how to reduce source limit in code ?
Here is link to my solution : http://ideone.com/xKpbHN
Approach : storing last digit of first 4 power of 1 to 20 (Eg 3^1,3^2,3^3,3^4)
in an array and then answering queries.
I just want to know how to remove source limit error??