Practice30Create account

A word-and-number arrangement machine works on an input line of words and two-digit numbers in steps, and in this machine nothing ever changes place. In each step the leftmost number it has not already dealt with is rubbed out and the difference of its two digits — the larger digit minus the smaller — is written in that same position. Words are never touched, and the machine stops once every number of the line has been dealt with.
Input: 52 rice 86 pancake 41 noodles 93.
In the last step of the above arrangement, which element is second from the right end?

Competition practiceInput-Output
  • Anoodles
  • B6
  • C3
  • D93

Step-by-Step Solution

Step 1: 3 rice 86 pancake 41 noodles 93. Step 2: 3 rice 2 pancake 41 noodles 93. Step 3: 3 rice 2 pancake 3 noodles 93. Step 4, the last: 3 rice 2 pancake 3 noodles 6. Counting from the right end — 6, then noodles — the second element is noodles. "6" is first from the right, an off-by-one count. "3" is third from the right. "93" is the number as it stood in the input, forgetting that the last step replaces it by 9 minus 3.
Answer: A) noodles

Master this topic in 30 minutes a day.

Don't just memorise the answer — build a daily practice habit.

Practice 5 Similar Questions Free →

All Input-Output practice questions

More Input-Output practice

A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…A word-and-number arrangement machine, when given an input line of words and numbers,…An input-output arrangement machine rearranges a line of words and numbers one step at a…An input-output arrangement machine rearranges a line of words and numbers one step at a…