Search
⌘K

Leetcode 1780. Check if Number is a Sum of Powers of Three

Determine whether a positive integer n can be expressed as a sum of distinct powers of three — equivalently, check that n’s base‑3 representation contains only the digits 0 and 1 (no 2s).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.