UVA10879 Code Refactoring

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=20&page=show_problem&problem=1820 [PDF](https://uva.onlinejudge.org/external/108/p10879.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10879/099082df4a73751e00a19aa91b74b5b0021ef72a.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10879/98a116ee80c85fc36194fb28542ec2a5a2ddc753.png)