The one-way routes connecting towns $A,M,C,X,Y,$ and $Z$ are shown in the figure below(not drawn to scale).The distances in kilometers along each route are marked. Traveling along these routes, what is the shortest distance from A to Z in kilometers?
[2024-AMC8-q14.png](https://artofproblemsolving.com/wiki/index.php/File:2024-AMC8-q14.png)
$\textbf{(A)}\ 28 \qquad \textbf{(B)}\ 29 \qquad \textbf{(C)}\ 30 \qquad \textbf{(D)}\ 31 \qquad \textbf{(E)}\ 32$
We can simply see that path $A \rightarrow X \rightarrow M \rightarrow Y \rightarrow C \rightarrow Z$ will give us the smallest value. Adding, $5+2+6+5+10 = \boxed{28}$. This is nice as it’s also the smallest value, solidifying our answer.
You can also simply brute-force it or sort of think ahead - for example, getting from A to M can be done $2$ ways; $A \rightarrow X \rightarrow M$ ($5+2$) or $A \rightarrow M (8)$, so you should take the shorter route ($5+2$). Another example is M to C, two ways - one is $6+5$ and the other is $14$. Take the shorter route. After this, you need to consider a few more times - consider if $5+10$ ($Y \rightarrow C \rightarrow Z$) is greater than $17 (Y \rightarrow Z$), which it is not, and consider if $25 (M \rightarrow Z$) is greater than $14+10$ ($M \rightarrow C \rightarrow Z$) or $6+5+10$ ($M \rightarrow Y \rightarrow C \rightarrow Z$) which it is not. TL;DR: $5+2=6=5=10 = \boxed{28}$. [Note: This is probably just the thinking behind the solution.] {Double-note: As MaxyMoosy said, since this answer is the smallest one, it has to be the right answer.}
~MaxyMoosy ~HACKER2022