UVA652 Eight

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA652/2304314f7a97695203c8e792920dbc0abf654120.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA652/69c043c16658ff9c936c96642a099404887df515.png)