Search
⌘K

Leetcode 263. Ugly Number

Determine whether an integer n is an "ugly number" — a positive integer whose only prime factors are 2, 3, and 5 (return false for non-positive values). A common approach is to repeatedly remove factors 2, 3, and 5 and check if the result equals 1.


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.