math's submission of Gravity Guy | CodeChef