Solution for Encode Integer-SNGINT problem in SPOJ