UVA10482 The Candyman Can

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=16&page=show_problem&problem=1423 [PDF](https://uva.onlinejudge.org/external/104/p10482.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10482/957b7843331a8b8252630225e672e0c66ca43d49.png)

Input Format

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

Output Format

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