标签:break return pre turn ber == int res def
def isUgly(num):
"""
:type num: int
:rtype: bool
"""
if num>0:
if num in [1,2,3,5]:
return True
else:
res =True
for i in [2,3,5]:
if num%i==0:
res = isUgly(num/i)
break
else:
if i==5:
res = False
else:
res = False
return res
标签:break return pre turn ber == int res def
原文地址:https://www.cnblogs.com/ffeng0312/p/9344946.html