David's submission of A Problem on Sticks | CodeChef