def a(n): # 寻找所有因子
list1 = []
for i in range(1,int(n**0.5)+1):
if n % i == 0:
list1.append(i)
list1.append(n/i)
return set(list1)
def b(n) : # 货物摆放
set1 = set()
factor = a(n)
for q in factor:
for w in factor:
for e in factor:
if q*w*e == n :
set1.add((q,w,e))
print(len(set1))
b(2021041820210418)
正确答案 : 2430
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)