UVA13291 Frosting on the Cake

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5215 [PDF](https://uva.onlinejudge.org/external/132/p13291.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13291/0b0f6dea8b8ae36d566023dbb6619aa157429c8f.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13291/55f1d3faa7d1331adb39915689caafbc50dc3396.png)

Output Format

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