UVA562 Dividing coins

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=7&page=show_problem&problem=503 [PDF](https://uva.onlinejudge.org/external/5/p562.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA562/0c961d4b566969b459ac65d73fbc42d895d6f707.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA562/0b9a95841ce124579ed7922a3d8a82e021695f8b.png)

Output Format

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