https://romankurnovskii.com/en/tracks/algorithms-101/leetcode/medium/1780/
1780. Check if Number is a Sum of Powers of Three