Count how many students pass the exam based on their answer sheets.
Unlock detailed company stats for this questionUpgrade
Answer sheets are stored in an integer array A; each digit of A[i] is one answer. A student passes if (1) the sum of the digits in the sheet is greater than the smallest digit in integer M, and (2) no digit of the sheet appears in M. Return the number of students who passed. Inputs: N (number of students), M, and array A. Example: N=3, M=7777, A=[909, 3347, 1211] -> 1. Example 2: N=5, M=7723, A=[9302, 1001, 2, 56, 6] -> 2.
Format · Cognizant GenC Python cluster assessment, Dec 2025.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
