丑数就是只包含质因数 2, 3, 5 的正整数
https://leetcode-cn.com/problems/ugly-number/submissions/
循环:
class Solution {
public boolean isUgly(int num) {
if(num<1) return false;
while(num % 2 == 0) num=num/2;
while(num % 3 == 0) num=num/3;
while(num % 5 == 0) num=num/5;
return num==1;
}
}