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 number whose digits add up to the greatest total, among the numbers not already shifted in an earlier step, is taken out and placed at the extreme left end of the line; if two numbers give the same total, the larger of them is taken first. Every other element keeps its relative position, and the machine stops once every number has been shifted.
Input: fossil 37 nectar 82 quartz 15 saddle 64.
Which of the following is the last step of the above arrangement?

Competition practiceInput-Output
  • A82 64 37 15 fossil nectar quartz saddle
  • B15 37 64 82 fossil nectar quartz saddle
  • C15 37 64 82 fossil nectar saddle quartz
  • Dfossil nectar quartz saddle 15 37 64 82

Step-by-Step Solution

Digit totals: 37, 82 and 64 all give 10, and 15 gives 6. Among the three tied numbers the larger goes first, so the order of shifting is 82, 64, 37, 15. Step 1: 82 fossil 37 nectar quartz 15 saddle 64. Step 2: 64 82 fossil 37 nectar quartz 15 saddle. Step 3: 37 64 82 fossil nectar quartz 15 saddle. Step 4: 15 37 64 82 fossil nectar quartz saddle. Because every number is dropped at the extreme left, the number shifted first ends up furthest right of the four, so the block reads 15 37 64 82 and not 82 64 37 15. The words never move on their own, so they stay in the order fossil, nectar, quartz, saddle.
Answer: B) 15 37 64 82 fossil nectar quartz saddle

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