UVA759 The Return of the Roman Empire

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=9&page=show_problem&problem=700 [PDF](https://uva.onlinejudge.org/external/7/p759.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA759/d960a5121a477f625064458e28cc972f1fbf31d7.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA759/4ef1dc1a28c1ae33b43d7be40f5556f0c5ff8294.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA759/4e5f59b63a7b0f73a13a475dc69568547e8e2489.png)