package leetcode;

/**
 * https://leetcode.com/problems/number-of-students-doing-homework-at-a-given-time/
 */
public class Problem1450 {
    public int busyStudent(int[] startTime, int[] endTime, int queryTime) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1450 prob = new Problem1450();
        System.out.println(prob.busyStudent(new int[]{1,2,3}, new int[]{3,2,7}, 4)); // 1
        System.out.println(prob.busyStudent(new int[]{4}, new int[]{4}, 4)); // 1
        System.out.println(prob.busyStudent(new int[]{4}, new int[]{4}, 5)); // 0
        System.out.println(prob.busyStudent(new int[]{1,1,1,1}, new int[]{1,3,2,4}, 7)); // 0
        System.out.println(prob.busyStudent(new int[]{9,8,7,6,5,4,3,2,1}, new int[]{10,10,10,10,10,10,10,10,10}, 5)); // 5
    }
}

@@ -219,38 +219,28 @@
     
-// TODO%0A        return
+int answer =
  0;%0A    
 %7D%0A%0A 
@@ -239,572 +239,201 @@
     
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem1450 prob = new Problem1450();%0A        System.out.println(prob.busyStudent(new int%5B%5D%7B1,2,3%7D, new int%5B%5D%7B3,2,7%7D, 4)); // 1%0A        System.out.println(prob.busyStudent(new int%5B%5D%7B4%7D, new int%5B%5D%7B4%7D, 4)); // 1%0A        System.out.println(prob.busyStudent(new int%5B%5D%7B4%7D, new int%5B%5D%7B4%7D, 5)); // 0%0A        System.out.println(prob.busyStudent(new int%5B%5D%7B1,1,1,1%7D, new int%5B%5D%7B1,3,2,4%7D, 7)); // 0%0A        System.out.println(prob.busyStudent(new int%5B%5D%7B9,8,7,6,5,4,3,2,1%7D, new int%5B%5D%7B10,10,10,10,10,10,10,10,10%7D, 5)); // 5
+for (int i = 0; i %3C startTime.length; i++) %7B%0A            if (startTime%5Bi%5D %3C= queryTime && queryTime %3C= endTime%5Bi%5D) %7B%0A                answer++;%0A            %7D%0A        %7D%0A        return answer;
 %0A   

Solve problem 1450