UVA12899 A game for kids

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=861&page=show_problem&problem=4764 [PDF](https://uva.onlinejudge.org/external/128/p12899.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12899/aef2afbbc2d2101730e4174b0940427278cf4389.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12899/6d044d629ba93b398c07fdea41c2bcab771302f7.png)