标签:pre ber ret gnu 一个 numbers number continue div
def selfDividingNumbers(left, right):
l=[]
for i in range(left,right+1):
a=str(i)
if ‘0‘ in a:
continue
else:
tem=[]
for j in a:
tem.append(i%int(j)==0)
if all(tem):
l.append(i)
return l
标签:pre ber ret gnu 一个 numbers number continue div
原文地址:https://www.cnblogs.com/zhangtianxia/p/9061273.html