UVA915 Stack of Cylinders

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=856 [PDF](https://uva.onlinejudge.org/external/9/p915.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA915/194785f19b3ff76e0fb643a2a391d2d7ea3a9ccd.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA915/15d41e23bfe56b2b2d5b0a04e42c412984c3d6f0.png)