From 8084cadad91c13ded4047529c4afcb872a729997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Tue, 26 Jan 2021 23:00:19 +0100 Subject: [PATCH] Fix option count computation --- runall.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runall.py b/runall.py index 9d19ae1..31069ca 100644 --- a/runall.py +++ b/runall.py @@ -21,7 +21,8 @@ def check_pairs(script, pairs): def find_script(pairs, max_length): candidates = [] - total_options = len(string.printable) ** max_length + chars = len(string.printable) + total_options = int((chars ** (max_length + 1) - 1) / (chars - 1)) current_option = 0 for length in range(max_length + 1):