UVA10705 The Fun Number System

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=19&page=show_problem&problem=1646 [PDF](https://uva.onlinejudge.org/external/107/p10705.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10705/0a92476088c6a8ec80db8d2a661ec0269eb04b99.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10705/5dc00d4b3aea580509c757ed29f855d6eade8773.png)