快乐的数字 信计一班罗逸凡

n = int(input())
count = 0
while (n != 1):
lenth = list(str(n))
n = 0
for i in lenth:
n = n + int(i)*int(i)
count = count + 1
if count > 100:
break
if n == 1:
print("True")
else:
print("False")

 

 学号:37

posted @ 2021-09-15 19:31  罗逸凡  阅读(36)  评论(0)    收藏  举报