UVA10042 Smith Numbers

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=983 [PDF](https://uva.onlinejudge.org/external/100/p10042.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10042/8ac98d3137f722f70f93c57c6a012fdfaee4e0cf.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10042/924efa67ab1e62b9fb6fb31b4f6097db6d2ed63a.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10042/6d9c49f1b63944927cf4636580ab41253f068f87.png)