Must be written in JavaScript.
5.
[Problem Description]
Ms. Sam decided that if more than X students were late,she would give the last student a grade of F.
Given the start time of the lecture N, the tardymarginal variable X, and the arrival time of the students in theclassroom, please return the arrival time of the student receivingthe F grade. However, if less than X students are late, Sam hasdecided to move on with ease, so just print out thePASS.
For example, if N = '13:00', X = 3, arrived = ['12:50','12:55', '13:00', '13:05', '13:10'] , because there are 2 peoplewho are late, you just have to return 'PASS'.
Also, if N = '09:00', X = 3, arrived = ['09:10','13:05', '13:10'], return ‘13:10’.
[Restrictions]
-N is a form of time, starting at "00:00" and ending at "23:59".There is no case where the lecture is carried over to the nextday.
- X is greater than or equal to 1 and less than or equal to100.
- The length of arrived is 1 or more and 1000 or less.
[Input format]
- N and X, arrived are given.
[Output Format]
- Please return the arrival time of the student who received anF grade.
///
function solution(N, X, arrived) {
var answer = '';
return answer;
}
///
Must be written in JavaScript. 5. [Problem Description] Ms. Sam decided that if more than X students were late, she woul
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Must be written in JavaScript. 5. [Problem Description] Ms. Sam decided that if more than X students were late, she woul
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!