UVA653 Gizilch

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA653/9d5ee217761ee8dcd2399b985f8682cf71d63145.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA653/f7f5ab1115d6c7a96fa4281764eb9ef518dcdd32.png)