📅  最后修改于: 2022-03-11 14:52:26.798000             🧑  作者: Mango
public static int sumDigits(int number){
if (number < 10) return -1;
int sum = 0;
while (number > 10){
sum += number % 10;
number /= 10;
}
return sum + number;