UVA11511 Frieze Patterns

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=27&page=show_problem&problem=2506 [PDF](https://uva.onlinejudge.org/external/115/p11511.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11511/f8b5b174f05e8af2557eed710599380db53db519.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11511/75dfc000d567493f188092c6d5f8d1bec40e5b93.png)