快乐数字
num=eval(input()) while num!=1: num=pow((num//100),2)+pow((num%100)//10,2)+pow((num%10),2) print("happy") else: print("输入格式错误")
posted on 2018-04-04 19:25 hbuzhangshuning 阅读(269) 评论(0) 编辑 收藏 举报
num=eval(input()) while num!=1: num=pow((num//100),2)+pow((num%100)//10,2)+pow((num%10),2) print("happy") else: print("输入格式错误")
posted on 2018-04-04 19:25 hbuzhangshuning 阅读(269) 评论(0) 编辑 收藏 举报