From 9576bc490f615a9d631b7311474f142967dab22e Mon Sep 17 00:00:00 2001 From: Pascal Lais Date: Tue, 21 Dec 2021 16:30:01 +0100 Subject: [PATCH] Update day 21 solution --- day-21/day-21.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day-21/day-21.py b/day-21/day-21.py index f343a24..6c92b95 100644 --- a/day-21/day-21.py +++ b/day-21/day-21.py @@ -16,8 +16,8 @@ def quantum_roll(state, p0, p1, s0, s1): for d2 in [1, 2, 3]: new_p0 = (p0 + d0 + d1 + d2) % 10 new_s0 = s0 + new_p0 + 1 - (x1, y1) = quantum_roll(state, p1, new_p0, s1, new_s0) - res = (res[0] + y1, res[1] + x1) + (w1, w0) = quantum_roll(state, p1, new_p0, s1, new_s0) + res = (res[0] + w0, res[1] + w1) state[(p0, p1, s0, s1)] = res return res