UVA11720 How Many Ways

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=117&page=show_problem&problem=2767 [PDF](https://uva.onlinejudge.org/external/117/p11720.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11720/c1c58563adc2ecd5e114fa10288dc07b48581363.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11720/013faea24c8d12f8b6e46f65362188505710103b.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11720/3a4942e4f34bd9576e54faa15b0dc7edd280bb46.png)