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] ,,,,,,,,,,,,,,, def fun(x): if x==1 or x==0: return 1 else: return x*fun(x-1) d=[] for i in range...
回答于 2022-04-26 13:53
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:56
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]: d+=1 if int(j[k])==6 or int...
回答于 2022-04-26 12:30
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))
回答于 2022-04-26 10:25