UVA12116 The Dumb Grocer

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=243&page=show_problem&problem=3268 [PDF](https://uva.onlinejudge.org/external/121/p12116.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12116/7548381fdde9c4f867a6c2532d126d149dc6bdac.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12116/684cd39f6b948c628e9a26c29e6a1e35954beb2a.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12116/5eea3242bc485f842e9da325ec8952b80671f8e2.png)