@@ -0,0 +1,740 @@
+package leetcode;%0A%0Aimport java.util.Map;%0Aimport java.util.stream.IntStream;%0A%0Apublic class Task1010 %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        System.out.println(new Task1010().numPairsDivisibleBy60(new int%5B%5D%7B30, 20, 150, 100, 40%7D));%0A        System.out.println(new Task1010().numPairsDivisibleBy60(new int%5B%5D%7B60, 60, 60%7D));%0A    %7D%0A%0A    // 20 - 40, 100, 160, 210%0A%0A    public int numPairsDivisibleBy60(int%5B%5D time) %7B%0A        return (int) IntStream.range(0, time.length)%0A                .boxed()%0A                .flatMap(i -%3E IntStream.range(i + 1, time.length)%0A                        .mapToObj(j -%3E Map.entry(time%5Bi%5D, time%5Bj%5D)))%0A                .filter(e -%3E (e.getKey() + e.getValue()) %25 60 == 0)%0A                .count();%0A%0A    %7D%0A%7D%0A

Add Task1010