NMAT 2026 Quiz 27: Input Output

A computer program converts numbers into numeric codes in six steps as shown for the four example inputs below. Study the pattern in the table given below and then answer the questions that follow.

Input

3

4

5

6

Step 1

10

13

16

19

Step 2

2

5

8

11

Step 3

9

21

33

45

Step 4

10

4

7

10

Step 5

51

21

36

51

Step 6

7

4

10

7

Q1. If the program is run on each member of the sequence 2, 7, 10 and 11, then which of the following will be the sequence of corresponding outputs at Step 4? Correct Option 3 … Explanation: The rules are: Step 1 = 3 × Input + 1; Step 2 = Step 1 − 8; Step 3 = 4 × Step 2 + 1; Step 4 = digital root of Step 3 + 1; Step 5 = 5 × Step 4 + 1; Step 6 = digital root of Step 5 + 1. Because Step 1 grows by 3 for every unit increase in the input, the Step 4 output repeats in a cycle of 3 (inputs 3 and 6 both give 10). So inputs that leave remainder 0, 1 and 2 when divided by 3 give 10, 4 and 7 respectively. Input 7: Step 1 = 22, Step 2 = 14, Step 3 = 57, digital root 3, Step 4 = 4. Input 10 also leaves remainder 1, so Step 4 = 4. Inputs 2 and 11 leave remainder 2 (like input 5), so Step 4 = 7. Check for 11: Step 1 = 34, Step 2 = 26, Step 3 = 105, digital root 6, Step 4 = 7. The sequence is 7, 4, 4 and 7. Hence, option 3. Q2. If the input to the program is 20, then what will be the output at Step 6? Correct Option 5 … Explanation: Applying the rules to input 20: Step 1 = 3 × 20 + 1 = 61; Step 2 = 61 − 8 = 53; Step 3 = 4 × 53 + 1 = 213; Step 4 = (2 + 1 + 3) + 1 = 7; Step 5 = 5 × 7 + 1 = 36; Step 6 = (3 + 6) + 1 = 10. Hence, option 5. Q3. If the output at Step 1 is 4, then what will be the output at Step 5? Correct Option 5 … Explanation: Step 1 = 3 × Input + 1 = 4, so the input is 1. The Step 4 output repeats in a cycle of 3 inputs; input 1 leaves remainder 1 when divided by 3, just like input 4, so Step 4 = 4. Then Step 5 = 5 × 4 + 1 = 21. Hence, option 5. Q4. If the input to the program is 15, then at what step will the output be 10? Correct Option 4 … Explanation: For input 15: Step 1 = 3 × 15 + 1 = 46; Step 2 = 46 − 8 = 38; Step 3 = 4 × 38 + 1 = 153; Step 4 = (1 + 5 + 3) + 1 = 10; Step 5 = 5 × 10 + 1 = 51. The output is 10 at Step 4. Hence, option 4.

A machine arranges an input into the following manner:

Input: 42 74 TBEF WRAK 95 NLDG 31 65 KEOR QCOF

Step I: 90 42 74 TBEF NLDG 31 65 KEOR QCOF AKRW 

Step II: 79 90 42 NLDG 31 65 KEOR QCOF AKRW BEFT 

Step III: 60 79 90 42 NLDG 31 KEOR AKRW BEFT CFOQ 

Step IV: 47 60 79 90 31 KEOR AKRW BEFT CFOQ DGLN 

Step V: 26 47 60 79 90 AKRW BEFT CFOQ DGLN EKOR 

Step V is the last step of the rearrangement.

As per the rules followed in the above steps, find out in each of the following questions the appropriate steps for the given input. 

Input: IMRE 40 69 RBHI 86 PMCN 25 KDSM 57 VATW

Q5. How many steps are needed to complete the arrangement? Correct Option 1 … Explanation: In each step, the largest remaining number is taken, increased by 5 if even or decreased by 5 if odd, and placed at the left end. Simultaneously, one word has its letters arranged alphabetically and is placed at the right end, in alphabetical order of the rearranged words. For the given input: Step I: 91 IMRE 40 69 RBHI PMCN 25 KDSM 57 ATVW; Step II: 64 91 IMRE 40 PMCN 25 KDSM 57 ATVW BHIR; Step III: 52 64 91 IMRE 40 25 KDSM ATVW BHIR CMNP; Step IV: 45 52 64 91 IMRE 25 ATVW BHIR CMNP DKMS; Step V: 20 45 52 64 91 ATVW BHIR CMNP DKMS EIMR. With five numbers and five words, the arrangement finishes at Step V. Hence, option 1. Q6. Which step number is the following output? 45 52 64 91 IMRE 25 ATVW BHIR CMNP DKMS Correct Option 4 … Explanation: Following the rule (largest number ±5 to the left end; alphabetised words in alphabetical order to the right end), the steps are: Step I: 91 IMRE 40 69 RBHI PMCN 25 KDSM 57 ATVW; Step II: 64 91 IMRE 40 PMCN 25 KDSM 57 ATVW BHIR; Step III: 52 64 91 IMRE 40 25 KDSM ATVW BHIR CMNP; Step IV: 45 52 64 91 IMRE 25 ATVW BHIR CMNP DKMS. The given output matches Step IV. Hence, option 4. Q7. Which of the following is Step III? Correct Option 2 … Explanation: Step I: 91 (86 + 5) goes to the left end and ATVW (from VATW) to the right end. Step II: 64 (69 − 5) to the left and BHIR (from RBHI) to the right. Step III: 52 (57 − 5) to the left and CMNP (from PMCN) to the right, giving 52 64 91 IMRE 40 25 KDSM ATVW BHIR CMNP. Option 1 reverses the order of BHIR and CMNP, while options 3 and 4 scramble the order of the numbers. Hence, option 2. Q8. Which of the following elements is the 4th to the left of the one which is 8th from the left in Step IV? Correct Option 3 … Explanation: Step IV is 45 52 64 91 IMRE 25 ATVW BHIR CMNP DKMS. The 8th element from the left is BHIR. The 4th element to the left of BHIR is the 4th from the left end (8 − 4 = 4), which is 91. Hence, option 3.

A computer program converts numbers into numeric codes in as shown for the example inputs below. Study the pattern and then answer the questions that follow.

Input: 1493 7489 6271 3514 8517 1438 

Step I: 9431 9874 7621 5431 8751 8431 

Step II: 9874 9431 8751 8431 7621 5431 

Step III: 97 93 85 83 72 53 

Step IV: 63 27 40 24 14 15 

And Step IV is the last step of the above input. As per the rules followed in the above steps, find out the appropriate steps for the given input. 

Input: 1648 7523 4153 5168 3821 2765 4785 8345

Q9. What is the sum of the numbers that are third, fourth and sixth from the left end in Step IV? Correct Option 4 … Explanation: The rules are: Step I arranges the digits of each number in descending order; Step II arranges these numbers in descending order; Step III keeps the 1st and 3rd digits of each number; Step IV writes the product of the two digits. For the given input: Step I: 8641 7532 5431 8651 8321 7652 8754 8543; Step II: 8754 8651 8641 8543 8321 7652 7532 5431; Step III: 85 85 84 84 82 75 73 53; Step IV: 40 40 32 32 16 35 21 15. The 3rd, 4th and 6th numbers in Step IV are 32, 32 and 35, and their sum is 99. Hence, option 4. Q10. Which of the following is the difference between the number that is second from the left end in Step I and the third from the right end in Step III? Correct Option 2 … Explanation: Step I: 8641 7532 5431 8651 8321 7652 8754 8543, so the second from the left is 7532. Step III: 85 85 84 84 82 75 73 53, so the third from the right is 75. The difference is 7532 − 75 = 7457. Hence, option 2. Q11. Which of the following numbers is second to the left of the sixth from the left end in Step II? Correct Option 5 … Explanation: Step II is 8754 8651 8641 8543 8321 7652 7532 5431. The sixth from the left is 7652. The second to its left is the 4th from the left end, which is 8543. Hence, option 5. Q12. How many distinct numbers are present in Step IV? Correct Option 3 … Explanation: Step IV is 40 40 32 32 16 35 21 15. The values 40 and 32 each appear twice, so the distinct numbers are 40, 32, 16, 35, 21 and 15, which is 6 in total. Hence, option 3.

A word and number arrangement machine when given an input line of words and numbers rearranges them following a particular rule. The following is an illustration of input and rearrangement.

Input: 64 mountain 97 ship fresh 53 air 18 green 37 82 transport.

Step I: 18 64 mountain ship fresh 53 air green 37 82 transport 97 

Step II: 18 37 64 mountain ship fresh 53 air green transport 82 97 

Step III: 18 37 53 mountain ship fresh air green transport 64 82 97 

Step IV: 18 37 53 air mountain ship fresh green transport 64 82 97

Step V: 18 37 53 air fresh mountain ship green transport 64 82 97 

Step VI: 18 37 53 air fresh green mountain ship transport 64 82 97

Step VI is the last step of the rearrangement.

As per the rules followed in the above steps, find out in each of the following questions the appropriate steps for the given input. 

Input for the questions.

Input: 58 help shine 23 bowl 88 joke 49 act 77 crop 32

Q13. How many steps are needed to complete the arrangement? Correct Option 4 … Explanation: In each step, the smallest remaining number moves to the left side and the largest remaining number moves to the right side. Once all numbers are placed, the words are arranged one per step in alphabetical order after the left-side numbers. For the given input: Step I: 23 58 help shine bowl joke 49 act 77 crop 32 88; Step II: 23 32 58 help shine bowl joke 49 act crop 77 88; Step III: 23 32 49 help shine bowl joke act crop 58 77 88; Step IV: 23 32 49 act help shine bowl joke crop 58 77 88; Step V: 23 32 49 act bowl help shine joke crop 58 77 88; Step VI: 23 32 49 act bowl crop help shine joke 58 77 88; Step VII: 23 32 49 act bowl crop help joke shine 58 77 88. The arrangement is complete at Step VII. Hence, option 4. Q14. Which step number is the following output? 23 32 49 act bowl help shine joke crop 58 77 88 Correct Option 3 … Explanation: The numbers are placed in Steps I to III (23 and 88, then 32 and 77, then 49 and 58). Step IV places "act" and Step V places "bowl", giving 23 32 49 act bowl help shine joke crop 58 77 88, which matches the given output. Hence, option 3. Q15. Which of the following is Step I? Correct Option 1 … Explanation: In Step I, the smallest number (23) moves to the left end and the largest number (88) moves to the right end, while all other elements keep their relative order. This gives 23 58 help shine bowl joke 49 act 77 crop 32 88. Option 2 swaps the positions of the smallest and largest numbers, option 3 rearranges words too early, and option 4 contains 53, which is not in the input. Hence, option 1. Q16. In Step IV, which of the following words/numbers is in the 7th position from the right? Correct Option 2 … Explanation: Step IV is 23 32 49 act help shine bowl joke crop 58 77 88, which has 12 elements. The 7th position from the right is the 6th position from the left (12 − 7 + 1 = 6), which is "shine". Hence, option 2.

A computer program converts numbers into codes in six steps as shown for the example inputs below. Study the pattern in the table given below and then answer the questions that follow.

Input

1833

6140

7059

3908

1184

5274

Step 1:

O

K

U

T

N

R

Step 2:

85

89

79

80

86

82

Step 3:

1748

6051

6980

3828

1098

5192

Step 4:

40

24

46

42

36

34

Step 5:

T

L

W

U

R

Q

Step 6:

16

36

100

36

81

49

Q17. What is the value obtained in Step 6 for the input 3391? Correct Option 5 … Explanation: The rules are: Step 1 = letter whose alphabet position equals the sum of the input's digits; Step 2 = 100 − that position; Step 3 = Input − Step 2; Step 4 = 2 × (sum of digits of Step 3); Step 5 = letter at position Step 4 ÷ 2; Step 6 = (sum of digits of Step 4)². For input 3391: digit sum = 16, so Step 1 = P; Step 2 = 100 − 16 = 84; Step 3 = 3391 − 84 = 3307; Step 4 = 2 × (3 + 3 + 0 + 7) = 26; Step 5 = M (13th letter); Step 6 = (2 + 6)² = 64. Hence, option 5. Q18. For which of the values in Step 1 will the number obtained in Step 2 be a prime number? Correct Option 3 … Explanation: Step 2 = 100 − (alphabet position of the Step 1 letter). E (5) gives 95 = 5 × 19; G (7) gives 93 = 3 × 31; Q (17) gives 83, which is prime; M (13) gives 87 = 3 × 29; V (22) gives 78 = 2 × 39. Only Q gives a prime number. Hence, option 3. Q19. If for an input, Step 5 is P, R, A, N, A, V, what is Step 6? Correct Option 1 … Explanation: Step 5 is the letter at position Step 4 ÷ 2, so Step 4 = 2 × the letter's position. Step 6 is the square of the digit sum of Step 4. P (16) gives 32, so (3 + 2)² = 25. R (18) gives 36, so (3 + 6)² = 81. A (1) gives 2, so 2² = 4. N (14) gives 28, so (2 + 8)² = 100. A gives 4 again. V (22) gives 44, so (4 + 4)² = 64. Step 6 is 25, 81, 4, 100, 4, 64. Hence, option 1. Q20. If the input is 2345, 1968, 3564, 6047, 4581, which of the following numbers is not present in Step 4? Correct Option 2 … Explanation: Step 2 = 100 − (digit sum of input), Step 3 = Input − Step 2, and Step 4 = 2 × (digit sum of Step 3). For 2345: digit sum 14, Step 2 = 86, Step 3 = 2259, Step 4 = 2 × 18 = 36. For 1968: digit sum 24, Step 2 = 76, Step 3 = 1892, Step 4 = 2 × 20 = 40. For 3564: digit sum 18, Step 2 = 82, Step 3 = 3482, Step 4 = 2 × 17 = 34. For 6047: digit sum 17, Step 2 = 83, Step 3 = 5964, Step 4 = 2 × 24 = 48. For 4581: digit sum 18, Step 2 = 82, Step 3 = 4499, Step 4 = 2 × 26 = 52. Step 4 is 36, 40, 34, 48, 52, so 38 is not present. Hence, option 2.