Day 15 part2 correct answer

This commit is contained in:
kplaczek
2021-12-18 14:51:23 +01:00
parent 9301293df9
commit 8acd426a62

View File

@@ -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