SPOJ Add reversed numbers in 2 Methods