题目描述
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:
1 | Input: 6 |
Example 2:
1 | Input: 8 |
Example 3:
1 | Input: 14 |
代码实现
1 | class Solution { |
题目描述
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:
1 | Input: 6 |
Example 2:
1 | Input: 8 |
Example 3:
1 | Input: 14 |
代码实现
1 | class Solution { |