UVA942 Cyclic Numbers

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=883 [PDF](https://uva.onlinejudge.org/external/9/p942.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA942/535435c2cd65302b018d949a6d0c5a35fc34baf1.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA942/4081e40dff0f6ead30500bbc6721de7515e119be.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA942/8ea879cdc28d7f9a56023fded53cd7f85fe88006.png)