输入一个整数,求该整数的各位数之和比如输入123,输出6输入1234,输出10
收起
a=int(input()) s=0 while a>0: s+=a%10 a//=10 print(s)
报告相同问题?