SPOJ 9734: Hacking the random number generator