UVA269 Counting Patterns

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=205 [PDF](https://uva.onlinejudge.org/external/2/p269.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA269/d11d88988262fd787285b5badf9e3ab8feb67f27.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA269/0808e11222d3ddf9ea18d1d02a6afe2dfa226e17.png)

Output Format

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