CEMC Banner

Problem of the Week
Problem A and Solution
Follow the Rules

Problem

Consider the following step-by-step instructions:

  1. Pick a \(2\)-digit number.

  2. If the number is even, divide it by \(2\). If the number is odd, add \(10\) to the number.

  3. If the result of the calculation in step \(2\) is a \(2\)-digit number, add its tens digit to its ones digit. Otherwise, add \(20\) to the number calculated in step \(2\).

  4. If the result of the calculation in step \(3\) is a multiple of \(5\), divide it by \(5\). Otherwise, add \(12\) to the number calculated in step \(3\).

  5. If the result of the calculation in step \(4\) is greater than \(30\), add \(1\) to it. Otherwise, subtract \(1\) from the number calculated in step \(4\).

  1. What is the result of following these instructions if you start with \(25\)?

  2. What is the result of following these instructions if you start with \(95\)?

  3. What is the result of following these instructions if you start with \(16\)?

Solution

  1. Following the steps and starting with \(25\) produces this sequence of numbers:

    \[25, 35, 8, 20, 19\]

  2. Following the steps and starting with \(95\) produces this sequence of numbers:

    \[95, 105, 125, 25, 24\]

  3. Following the steps and starting with \(16\) produces this sequence of numbers:

    \[16, 8, 28, 40, 41\]