UVA657 The die is cast

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=8&page=show_problem&problem=598 [PDF](https://uva.onlinejudge.org/external/6/p657.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA657/fb2dce85eeea47bb21dc08c1d2e3bc982a9c9698.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA657/5024d340c296a89a9123225d14a768e41c11ddeb.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA657/018bbc02878b855bab04805288f9484007e8ec3d.png)