UVA12972 Cuban Challenge

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4851 [PDF](https://uva.onlinejudge.org/external/129/p12972.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12972/7290375201b3f104e33e24cd4ed19911827ce933.png)

Input Format

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

Output Format

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