UVA10569 Number Theory

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1510 [PDF](https://uva.onlinejudge.org/external/105/p10569.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10569/cec707f2c273b6f4b45d72c979b2bca4fa765679.png)

Input Format

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

Output Format

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