UVA826 Symbolic Numerical System

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=10&page=show_problem&problem=767 [PDF](https://uva.onlinejudge.org/external/8/p826.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA826/69c0116fc902c7290b41353ef4064b64dde5475c.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA826/3866be168465623fb9bb5398a586f2a286cb7b6d.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA826/53292eb3d8691902354e9de2dc4b4c5fa6d2c09e.png)