Carregando o exercício…
The professor will only start class if enough students arrive by the beginning. The function angry_professor receives the minimum required number of students k and a list of arrival times a: a value of 0 or less means the student arrived on time. Count how many students made it on time and return YES if the class is cancelled, otherwise return NO.
3, [-1, -3, 4, 2]"YES"2, [0, -1, 2, 1]"NO"1, [5]"YES"def angry_professor(k: int, a: list[int]) -> str:
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
Entrar3, [-1,-3,4,2]"YES"2, [0,-1,2,1]"NO"1, [5]"YES"1, [0]"NO"2, [-5,-4,-3]"NO"1000, [0,-2,5,3]"YES"