UVA975 Gutenberg Clumsy Helper

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=916 [PDF](https://uva.onlinejudge.org/external/9/p975.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA975/e976bad8dd520c421c58fe1a1d0b41917a6fc929.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA975/11c90efc6f2e00c8731d770e50e283f3ba0d5a5d.png)