class Solution {
public int addDigits(int num) {
if(num == 0)
return 0;
if (num % 9 == 0)
return 9;
else
return num % 9;
}
}
leetcode 258. 各位相加
最新推荐文章于 2022-03-04 09:36:35 发布