UVA10958 How Many Solutions?

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=21&page=show_problem&problem=1899 [PDF](https://uva.onlinejudge.org/external/109/p10958.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10958/3a8e168a447c77fbbfefa58101461bb747fae095.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10958/38599132ef327403c3163e201056411cf69e883b.png)