CRYPTO1 - SPOJ Problem in C