UVA12434 Infinite Stable Integer

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=279&page=show_problem&problem=3865 [PDF](https://uva.onlinejudge.org/external/124/p12434.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12434/565dd7a0aebd1cbf84a4956b6bb6c1d996356604.png)

Input Format

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

Output Format

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