apple pie's submission of Three Dices | CodeChef