Directions:A number arrangement machine when given an input line of nu...
The logic behind the output is as follows:
Step I -
The first and last digit of the first number in Input is added and the sum is written first. The second, third, and fourth digits are written as it is after the sum, and the fifth digit is omitted. The same is continued with other numbers.
Step II -
The first and second digits of the first number in Step I are added and the sum is written first then the third and fourth digits are written as it is after the sum, and then the square of the last digit is written. The same is continued with other numbers.
Step III -
The first two digits of the first number in Step II are arranged in ascending order then the middle digit is kept as it is and then the the last two digits are arranged in descending order. The same is continued with other numbers.
Step IV -
The difference between the first two digits of the first number in Step III is written first, then the third and fourth digits are written as it is after the difference and then the double of the last digit is written. The same is continued with other numbers.
Step V -
The first two digits of the first number in Step IV are added and their square is written as a number. Then the product of the last two digits is written as a separate number. The same is continued with other numbers.
Input: 478667 578688 543867 765879 658574 866734
Step I: 11786 13786 12438 16658 10585 12667
Step II: 27836 47836 34364 76564 15825 36649
Step III: 27863 47863 34364 67564 15852 36694
Step IV: 5866 3866 1368 1568 4854 3698
/\ /\ /\ /\ /\ /\
Step V: 169 36 121 36 16 48 36 48 144 20 81 72
The second digit from the left of the third number from the left in Step IV is 3 and the fourth digit from the left of the second number from the right end in Step III is 5.
Difference = 5 - 3 = 2
Hence, the correct answer is 2.