My Spoj Problems code