1085. Sum of Digits in the Minimum Number

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1085

class Solution:
    def sumOfDigits(self, nums: List[int]) -> int:
        x = min(nums)
        s = 0
        while x:
            s += x % 10
            x //= 10
        return s & 1 ^ 1