UVA13006 Cake cut

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=866&page=show_problem&problem=4894 [PDF](https://uva.onlinejudge.org/external/130/p13006.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13006/29abb77c847f604be3f10376e53d3e96690be175.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13006/7e1b502d79bdb24e564778ce96470ba690e9a809.png)

Output Format

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