Skip to content

Latest commit

 

History

History
11 lines (11 loc) · 291 Bytes

1450. 在既定时间做作业的学生人数.md

File metadata and controls

11 lines (11 loc) · 291 Bytes
class Solution {
    public int busyStudent(int[] startTime, int[] endTime, int queryTime) {
        int ans = 0;
        for (int i = 0; i < endTime.length; i++) {
            if (startTime[i] <= queryTime && endTime[i] >= queryTime) ans++;
        }
        return ans;
    }
}