UVA11924 Unlock the Winning Pot

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=229&page=show_problem&problem=3075 [PDF](https://uva.onlinejudge.org/external/119/p11924.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11924/84d87bed304e7b0ad4202ad71ca76949699fb1f3.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11924/62ebb4f304beeba8d69d3e312496f3cc813b539e.png)