From 6d0a6170a882f872e3c538011cb72b7c285c83d8 Mon Sep 17 00:00:00 2001 From: Akuli Date: Sat, 4 Jan 2025 02:03:07 +0200 Subject: [PATCH] Use less memory so tests pass --- examples/aoc2024/day22/part2.jou | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/aoc2024/day22/part2.jou b/examples/aoc2024/day22/part2.jou index 274f87d1..7d148c8e 100644 --- a/examples/aoc2024/day22/part2.jou +++ b/examples/aoc2024/day22/part2.jou @@ -38,7 +38,7 @@ def diffseq_to_int(diffseq: int[4]) -> int: class Buyer: seed: long - diffseq_to_bananas: int* + diffseq_to_bananas: byte* def init_from_seed(self) -> None: last_digits: int[2000] @@ -59,7 +59,7 @@ class Buyer: # Go backwards so that we overwrite with whatever appears first in array for i = 1999; i >= 3; i--: diffseq = [deltas[i-3], deltas[i-2], deltas[i-1], deltas[i]] - self->diffseq_to_bananas[diffseq_to_int(diffseq)] = last_digits[i] + self->diffseq_to_bananas[diffseq_to_int(diffseq)] = last_digits[i] as byte def main() -> int: