Grice's submission of A Problem on Sticks | CodeChef