UVA11301 Great Wall of China

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=25&page=show_problem&problem=2276 [PDF](https://uva.onlinejudge.org/external/113/p11301.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11301/afc6890cec099d665663633e4b474ac73d171963.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11301/9b569d67ee1e082b141bd8a8c5cf468ea6c0366b.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11301/83e639602e344b5dd61e14fbaea084b18d50ac41.png)