# -*- coding:utf-8 -*-
class Solution:
def getDigitSum(self, num):
sum = 0
while num > 0:
sum += num % 10
num = int(num / 10)
return sum
def movingCore(self, threshold, rows
【leetcode】机器人的运动范围(递归回溯)
最新推荐文章于 2024-05-01 00:58:01 发布