UVA11112 Babylonian Roulette

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=23&page=show_problem&problem=2053 [PDF](https://uva.onlinejudge.org/external/111/p11112.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11112/dd3fd99a89e75346c9c2c72977096859d6e390ed.png)

Input Format

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

Output Format

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