Rosetta Problems

All Numbers Lead to 6174

https://onlinejudge.u-aizu.ac.jp/problems/0259