# How can I find the number of segments which are of different colors in a straight line?

#### Chemist116

The problem is as follows:

In a line segment, $100$ points are marked as indicated in the figure as shown below, which are numbered consecutively, starting at one end, with the numbers from $1$ to $100$. The points which its corresponding numbers are divisible by $3$ are painted red and the rest blue, how many segments whose ends are of different color the most?

The alternatives given are:

$\begin{array}{ll} 1.&\textrm{2275}\\ 2.&\textrm{2244}\\ 3.&\textrm{2211}\\ 4.&\textrm{2040}\\ \end{array}$

How exactly can I find the number of segments?.

Between $1$ and $100$ the number of points which will have multiples of $3$ be:

$\frac{99-3}{3}+1=33$

Then there will be $33$ points which will be divisible by $3$.

But in $100$ points there will be $99$ segments. But I don't know exactly how can this be scaled to any of those alternatives. Can someone help me?.