# 小学生写法 s = input("输入任意三位数:") while s != "495" and s != s[::-1]: s = str(abs(int(s) - int(s[::-1]))) print(s)