🌈 搜索
📅  最后修改于: 2022-03-11 14:47:19.087000             🧑  作者: Mango
def sum_of_digits(n): sum = 0 while (n != 0): sum = sum + int(n % 10) n = int(n/10) return sum