diff --git a/day_7/part_1.php b/day_7/part_1.php new file mode 100644 index 0000000..cfd9e53 --- /dev/null +++ b/day_7/part_1.php @@ -0,0 +1,22 @@ + $fuel_used) { + $lowest_fuel = $fuel_used; + $best_position = $i; + } +} + +echo sprintf('Best position is %u with %u fuel used.', $best_position, $lowest_fuel); \ No newline at end of file diff --git a/day_7/part_2.php b/day_7/part_2.php new file mode 100644 index 0000000..8dfdecd --- /dev/null +++ b/day_7/part_2.php @@ -0,0 +1,22 @@ + $fuel_used) { + $lowest_fuel = $fuel_used; + $best_position = $i; + } +} + +echo sprintf('Best position is %u with %u fuel used.', $best_position, $lowest_fuel); \ No newline at end of file