From dc71b2853d57c4587b3f592cdf8d1d244a1f5da0 Mon Sep 17 00:00:00 2001 From: 643c11352e6b2c0eaeb061ac <643c11352e6b2c0eaeb061ac@devide> Date: Sun, 16 Apr 2023 15:18:38 +0000 Subject: [PATCH] Auto commit --- main.py | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 4c0c135..5297b44 100644 --- a/main.py +++ b/main.py @@ -1 +1,59 @@ -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 -- GitLab