UVA953 The Incredible Pile Machine

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=894 [PDF](https://uva.onlinejudge.org/external/9/p953.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA953/04343b7b592b8df1510d868d31fecd6e266bae09.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA953/8d8153d7dfb0bf67a9b0c61b5827582a8caf97a6.png)

Output Format

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