@@ -0,0 +1,861 @@
+package com.javarush.task.task08.task0812;%0A%0Aimport java.io.*;%0Aimport java.util.ArrayList;%0A%0A/* %0AC%D0%B0%D0%BC%D0%B0%D1%8F %D0%B4%D0%BB%D0%B8%D0%BD%D0%BD%D0%B0%D1%8F %D0%BF%D0%BE%D1%81%D0%BB%D0%B5%D0%B4%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D1%8C%D0%BD%D0%BE%D1%81%D1%82%D1%8C%0A*/%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) throws IOException %7B%0A%0A        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));%0A%0A        ArrayList%3CInteger%3E array = new ArrayList%3C%3E();%0A        for (int i = 0; i %3C 10; i++) %7B%0A            array.add(Integer.parseInt(reader.readLine()));%0A        %7D%0A%0A        reader.close();%0A%0A        int counter = 1;%0A        int maxCount = 1;%0A        for (int i = 1; i %3C array.size(); i++) %7B%0A            if (!array.get(i - 1).equals(array.get(i))) %7B%0A                counter = 1;%0A            %7D else %7B%0A                counter++;%0A                if (counter %3E maxCount) maxCount = counter;%0A            %7D%0A        %7D%0A%0A        System.out.println(maxCount);%0A    %7D%0A%7D

Complete task0812