apple pie's submission of Beat the Average | CodeChef