pythonnumpy
Ben Gorman

Ben Gorman

Life's a garden. Dig it.

You decide to invest in a series of billboards along interstate 10 to advertise your stylish new chicken restaurant, Chic-fil-A 🐔.

  1. You buy three billboards evenly spaced starting from mile marker 17 and ending on mile marker 28.
  2. You buy another three billboards starting on mile marker 32 and ending on mile marker 36.
  3. In order, from mile marker 17 to 36, your billboards display these ads: A, B, C, C, B, A.

Determine how far each B ad is from your restaurant which is located at mile marker 30.

# ads / restaurant*:   A     B     C   *   C  B  A
# billboards:        --|-----|-----|---|---|--|--|--
# mile markers:       17          28  30  32    36
import numpy as np

Solution

This content is gated

Subscribe to one of the products below to gain access