UVA10843 Anne's game

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1784 [PDF](https://uva.onlinejudge.org/external/108/p10843.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10843/c8cd35c101412eb0797cd7b56bedce6403b5d10d.png)

Input Format

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

Output Format

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