Log in to get your input and submit your answers.

Day 12: Rain Risk

After the keynote in the amphitheater, you need to head over to the Bocal to collect some hardware. But with corridors under construction, skybridges, and convoluted detours between 42's buildings, navigation is quite a puzzle.

The Bocal's campus navigation app transmits a sequence of instructions (your puzzle input). Each line consists of an action letter and an integer value:

Part 1

You start at coordinates (0, 0) facing East.

Actions N, S, E, and W move you without changing the direction you are facing. Only actions L and R rotate your heading.

Example

Consider this sequence of navigation instructions:

F10
N3
F7
R90
F11

Here is how they execute step by step:

The Manhattan distance (|x| + |y|) from the starting location is: |17| + |-8| = 25.

Execute the instructions from your own input. What is the Manhattan distance between that location and your starting position?