UVA11662 Triangular Grid

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2709 [PDF](https://uva.onlinejudge.org/external/116/p11662.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11662/db058656037d92edc1558dc8e8e2993a2d7ec1ff.png)

Input Format

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

Output Format

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