Auto commit

上级 df352508
print('欢迎来到 InsCode')
\ No newline at end of file
num_list = {}
n_list = {}
index = 0
n = 0
for i in range(4, 10):
for j in range(4, 10):
for k in range(4, 10):
for a in range(4, 10):
if i != j and i != k and i != a and j != k and j != a and k != a:
num_list[index] = i * 1000 + j * 100 + k * 10 + a
index = index + 1
for m in num_list:
x = num_list[m]
for z in range(2, x):
if x % z == 0:
break
else:
n_list[n] = x
n = n + 1
print("所有组合的数是 %s" % num_list)
print("共有 %d 个" % len(num_list))
print("所有质数是 %s" % n_list)
print("共有 %d 个" % len(n_list))
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册