UVA263 Number Chains

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=199 [PDF](https://uva.onlinejudge.org/external/2/p263.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA263/102e74ebd249b2141ba67c2999caa959957dd1e4.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA263/4da5b905b70d45ac264e98f65647f00fbd675c07.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA263/4183a8dcc6870c75f885d1d31f861dbf3ab3baf1.png)