263. Ugly Number
Write a program to check whether a given number is an ugly number.
Ugly numbers are positive numbers whose prime factors only include 2, 3, 5
.
Example 1:
Example 2:
Example 3:
Note:
1
is typically treated as an ugly number.Input is within the 32-bit signed integer range: [−231, 231 − 1].
Last updated
Was this helpful?