2022-04-26 13:53 回答问题
d=[] for i in range(1,200001): b=str(i) c=0 for j in b: a=1 for l in range(1,int(j)+1): a=l*a c=c+a if i==c: d.append(i) print(d) d=[1,2,145,40585]
2022-04-26 12:56 回答问题
base1=[[2,3,5],[7,11,13],[17,19,23],[3,17,34]] base2=[[3],[17]] base3=[] for j in base1: a=0 for i in base2: for k in j: if i[0]==k: a+=1 if a==1: base3.append(j) print(base3)
2022-04-26 12:30 回答问题
n=int(input()) a=[] for i in range(n): b=input() a.append(b) m=0 for j in a: if len(j)==1: if int(j)==6: m+=1 else: m+=0 else: d=0 p=0 f=len(j)-1 for k in range(0,f): if j[k]<j[k+1]
2022-04-26 10:25 回答问题
b=[] for i in range(1,101): a=0 for j in range(1,i): if i%j==0: a=a+1 if a==1: b.append(i) d=[] for k in b: d.append(-k) d.reverse() print(tuple(d+b))