UVA437 巴比伦塔 The Tower of Babylon

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=6&page=show_problem&problem=378 [PDF](https://uva.onlinejudge.org/external/4/p437.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA437/9cfd091ffcf425df6dc3f975c119a7baf8b0d379.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA437/2a1d77dbe3a0a30c7bbc7ad5f7d1ce69e94eb6b8.png)