This commit is contained in:
2023-08-01 13:20:20 +07:00
parent 52bb9933c5
commit 3e4fbc6092
2 changed files with 19 additions and 0 deletions
+2
View File
@@ -1,3 +1,5 @@
.idea
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
+17
View File
@@ -0,0 +1,17 @@
import random
from collections import defaultdict
n = 55
seq_length = 7
match_times = 7
sequence_count = defaultdict(int)
while True:
sequence = random.sample(range(1, n + 1), seq_length)
sequence.sort()
seq = tuple(sequence)
sequence_count[seq] += 1
if sequence_count[seq] == match_times:
print(seq)
break