UVA10920 Spiral Tap

Description

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

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10920/155ef1907675bfbb55d00ff49b0e1d58b652530f.png)