NeetCode #917LC-1780MediumMath & Geometry
← Back to All Problems#917 · #1780 · Check if Number is a Sum of Powers of Three(判断一个数字是否可以表示成三的幂的和)
📌 Problem Statement & Constraints
Given an integer
n, return true if it can be written as the sum of distinct powers of three, otherwise false. Constraints: 1 <= n <= 10^7.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!