The infirmary door lock keypad has 16 buttons. With a six-digit code as audibly signified as using only two of those buttons, each pressed three times in succession, there would be only 120 possible combinations. Adding the restriction that they be adjacent to each other, there would be only 24 possible combinations for David to try, and only 12 if they were known to be adjacent horizontally.
more