Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Let's note that the maximum power of 3 you'll use in your soln is 3^16
The number can not be represented as a sum of powers of 3 if it's ternary presentation has a 2 in it