UVA12994 Palindromic Bases

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=862&page=show_problem&problem=4877 [PDF](https://uva.onlinejudge.org/external/129/p12994.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12994/2118089e1d97f02eac31c6d2ebaf8753ad229b1d.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12994/2a01c6e3fa8687ccca29e2216830f0049b2aa737.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12994/261d95c5bd44c3da0098ea80059212b2d592c03f.png)