UVA10601 Cubes

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=18&page=show_problem&problem=1542 [PDF](https://uva.onlinejudge.org/external/106/p10601.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10601/cf2acb71ad19c2cfca728363d0d62ea1ed138053.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10601/1337f1087209cfb453736471abe8f6c6c09b22a8.png)

Output Format

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