Practice30Create account

A word-and-number arrangement machine, when given an input line of words and numbers, rearranges it in steps. In each step the machine takes the leftmost number that it has not already dealt with, replaces that number by the sum of its digits, and places the result at the extreme right end of the line. Words are never moved and never changed, every other element keeps its relative position, and the machine stops once every number of the original line has been dealt with.
Input: 47 storm 26 basil 73 cloud.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • Astorm basil 73 cloud 11 8
  • Bstorm 26 basil 73 cloud 11
  • Cstorm basil 73 cloud 8 11
  • Dstorm basil 73 cloud 47 26

Step-by-Step Solution

The numbers are taken in the order they stand in the line, not by size. Step 1 deals with 47, whose digits add to 11: storm 26 basil 73 cloud 11. Step 2 deals with 26, whose digits add to 8: storm basil 73 cloud 11 8. Stopping at Step 1 leaves only 11 at the tail. Since each result is dropped at the extreme right, the first result ends up to the left of the second, so the tail reads 11 8 and not 8 11. The last line is what you get by carrying the numbers across unchanged instead of replacing each by its digit total.
Answer: A) storm basil 73 cloud 11 8

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,…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,…