题解 | #数字之和#
数字之和
https://www.nowcoder.com/practice/ae759916631f4711a90c4d4d9657f4b0
def Digit(n): arr = [] square = [] t=n while int(n): t =n % 10 arr.append(t) n = int(n/10) return arr def s(n): a = Digit(n**2) b = Digit(n) print("%d %d"%(sum(b),sum(a))) while True: try: n = int(input()) s(n) except: break