UVA10591 Happy Number

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1532 [PDF](https://uva.onlinejudge.org/external/105/p10591.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10591/60f39c7de76f07755a4ce1f2be431194e10d14b5.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10591/277e5866b3e6ef80112d840f948586538d2b0210.png)