UVA13140 Squares, Lists and Digital Sums

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=871&page=show_problem&problem=5051 [PDF](https://uva.onlinejudge.org/external/131/p13140.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13140/49bddff1c306185d7e025a27a4ca34d6dcf03831.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13140/0d7b9d542dd4226b5e84c451a34ef2d157f49308.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA13140/8372200938948bdd9467181f305f3b48fa6a3a5e.png)