2/24/2017 6:24:21 AM
how large is your number?
if it is a 10 digit number, it can be looped 10 times and the square of each digit is added to variable.
I can't think of a better solution in terms of time complexity.
Learn Playing. Play Learning
Send us a message