快乐的数字

N = eval(input())
flag = 1
while(flag):
C = 0
while (N != 0):
C = C + pow(N%10,2)
N = int(N/10)
N = C
if N < 10:
flag = 0
if N == 1:
print("True")
else :
print("False")

posted @ 2020-03-24 12:31  Xiao_kong  阅读(220)  评论(0编辑  收藏  举报