I am trying to solve this problem from SPOJ but I\'m getting TLE. Any help how can I optimize this?
My approach is, I break the input number into two parts and then r