UVA10999 Crabbles

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=21&page=show_problem&problem=1940 [PDF](https://uva.onlinejudge.org/external/109/p10999.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10999/f6215a23497ff97c6b1075ec6dc1c8eee06d832b.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10999/83185d318462d8156f744dc6c0b740c86f14fb9c.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10999/5469d4be9b7485deadb83aa7f061f02e4376de7e.png)