UVA10051 Tower of Cubes

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=992 [PDF](https://uva.onlinejudge.org/external/100/p10051.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10051/1253820165165dbbdc3a21eddb0b910223e50297.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10051/430f99c06f12c4071fd040fa52803c78505cc4e4.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10051/4ead35802124df52a30658fe381b3aa0bd5dd32c.png)