UVA10652 Board Wrapping

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=18&page=show_problem&problem=1593 [PDF](https://uva.onlinejudge.org/external/106/p10652.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10652/2531b5d3ead96ce0b4d356ccc519638e3e59a410.png)

Input Format

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

Output Format

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