UVA12501 Bulky process of bulk reduction

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=441&page=show_problem&problem=3945 [PDF](https://uva.onlinejudge.org/external/125/p12501.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12501/ca0b70ca54adb8fdbdb0308822a4f0346bf0bd24.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12501/078df508016f9c09a16293807c6b54324f34c8d6.png)

Output Format

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