Source code for SPOJ pricticing