2177. Find Three Consecutive Integers That Sum to a Given Number

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

Содержание

LeetCode problem 2177

class Solution:
    def sumOfThree(self, num: int) -> List[int]:
        x, mod = divmod(num, 3)
        return [] if mod else [x - 1, x, x + 1]