We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
class Solution: def isUgly(self, num): if num <= 0: return False for x in [2, 3, 5]: while num % x == 0: num = num // x return num == 1