UVA944 Happy Numbers

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=11&page=show_problem&problem=885 [PDF](https://uva.onlinejudge.org/external/9/p944.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA944/8082a84e1bc2a07a444f30e0abf23568a351d90b.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA944/25ffde18ed8fd98e82edd96097fdb470303d99dd.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA944/826e3f086409427a447599894e60a5a3aae9db6d.png)