摘要: class Solution(object): def addDigits(self, num): """ :type num: int :rtype: int """ sum=num%10 a=num/10 if a >=1: while a > 9: sum += a%10 a=a/10 sum 阅读全文
posted @ 2018-08-14 00:15 ffeng0312 阅读(120) 评论(0) 推荐(0)