From c22544594e251613a5dbf6c4ee505716867e55e6 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Wed, 28 Dec 2022 11:58:20 +0100 Subject: Day 20 [WIP] --- day20/test_init.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'day20/test_init.py') diff --git a/day20/test_init.py b/day20/test_init.py index b3ccc44..24b94cb 100644 --- a/day20/test_init.py +++ b/day20/test_init.py @@ -25,3 +25,11 @@ def test_rotation(): items = AssignmentOne.move(items, 4) assert items == [1, 2, -3, 4, 0, 3, -2] + + +def test_get_nth_number_after_0(): + items = [1, 2, -3, 4, 0, 3, -2] + + assert AssignmentOne.get_nth_number_after_0(items, 1000) == 4 + assert AssignmentOne.get_nth_number_after_0(items, 2000) == -3 + assert AssignmentOne.get_nth_number_after_0(items, 3000) == 2 -- cgit v1.2.3