UVA13239 Kid's Simple Puzzle Problem

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=878&page=show_problem&problem=5162 [PDF](https://uva.onlinejudge.org/external/132/p13239.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13239/9353b8c9580e906207b7601d52998b102ad50418.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13239/2b26c814607372e67034b21d0fc35186815a20b9.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13239/2b3fb2c08a36c4f82d660d25e0b12ae6eeb889b7.png)