UVA10390 Bean Counting

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=15&page=show_problem&problem=1331 [PDF](https://uva.onlinejudge.org/external/103/p10390.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10390/1397e2cce7222c459c8c8738ae3a74a4888d4609.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10390/73201dd6f37a8b33a63b992e29408fb98b35d624.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10390/8bb5dc02adca84846b2f7a4a9fd6f4b61b1763f7.png)