From 8acd426a6239e76f17e23dbc7c88f158d2f00b7a Mon Sep 17 00:00:00 2001 From: kplaczek Date: Sat, 18 Dec 2021 14:51:23 +0100 Subject: [PATCH] Day 15 part2 correct answer --- 15/part2.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/15/part2.php b/15/part2.php index 027aa02..4a4dd45 100644 --- a/15/part2.php +++ b/15/part2.php @@ -11,12 +11,9 @@ for ($i = 0; $i < 5; $i++) { if ($newNumber > 9) { $newNumber++; } - $newInput[count($input) * $i + $row][count($input[0]) * $j + $column] = $newNumber%10; } - } -// echo "\n"; } } $input = $newInput; @@ -52,4 +49,4 @@ while (count($queue) > 0) { } } -echo $visited[count($visited) - 1][count($visited[0]) - 1]; //553 +echo $visited[count($visited) - 1][count($visited[0]) - 1]; //2858