Brian's submission of Quasi-Polynomial Sum | CodeChef