1780. Check if Number is a Sum of Powers of Three Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 1780class Solution: def checkPowersOfThree(self, n: int) -> bool: while n: if n % 3 > 1: return False n //= 3 return True