UVA888 Donkey

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=10&page=show_problem&problem=829 [PDF](https://uva.onlinejudge.org/external/8/p888.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA888/3425e09524251cf93301d4ed80be3c5981bb4aba.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA888/59c89ccc1f96cb9ee6eeae1049bf8f975b4b3ba9.png)

Output Format

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