UVA11847 Cut the Silver Bar

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=226&page=show_problem&problem=2947 [PDF](https://uva.onlinejudge.org/external/118/p11847.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11847/9fa0b9b2bc13b7c811cfed1f6059783e646562a1.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11847/8dc96eb1c47e1b29e36e2c7676a760f824a1d376.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11847/800af4a4456f03314e20049a0ac26c69e8dada5f.png)