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: 41 storm 26 basil 73 cloud 58 verge.
Which of the following is Step 2 of the above arrangement?

Competition practiceInput-Output
  • A58 73 41 storm 26 basil cloud verge
  • B26 41 storm basil 73 cloud 58 verge
  • C73 58 41 storm 26 basil cloud verge
  • D41 storm 26 basil cloud verge 58 73

Step-by-Step Solution

Digit totals: 41 gives 5, 26 gives 8, 73 gives 10, 58 gives 13. So 58 goes first and 73 second. Step 1: 58 41 storm 26 basil 73 cloud verge. Step 2: 73 58 41 storm 26 basil cloud verge. The trap is to rank the numbers by their own size instead of by their digit total — that would send 73 out first and 58 second, giving 58 73 41 storm 26 basil cloud verge, which is the same eight elements in a different order.
Answer: C) 73 58 41 storm 26 basil cloud verge

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