UVA11944 $ 10 to Win?

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=229&page=show_problem&problem=3095 [PDF](https://uva.onlinejudge.org/external/119/p11944.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11944/003aa6c008bb22dfadc58019eb29a7c172002c3e.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11944/905471b99972c0fb462e890c829e5acd1176d5b3.png)

Output Format

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