当前位置:网站首页>1450. Number of students doing homework at a given time

1450. Number of students doing homework at a given time

2020-11-09 08:25:00 osc_6jhxf9ab

Answer key

Simple routine questions

class Solution:
    def busyStudent(self, startTime: List[int], endTime: List[int], queryTime: int) -> int:
        num = 0
        for i in range(len(endTime)):
            if endTime[i]>= queryTime and startTime[i]<= queryTime:
                num+=1
        return num 

版权声明
本文为[osc_6jhxf9ab]所创,转载请带上原文链接,感谢