would appreciate some help :)
package com.codegym.task.task08.task0812;
import java.io.*;
import java.util.ArrayList;
/*
Longest sequence
*/
public class Solution {
public static void main(String[] args) throws IOException {
//write your code here
ArrayList<Integer> list = new ArrayList<>();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
for (int i = 0; i < 10; i++) {
list.add(Integer.parseInt(reader.readLine()));
}
int temp = 0;
int count = 1;
for (int i = 0; i <9 ; i++) {
if(list.get(i).equals(list.get(i+1)))
count++;
else {
if (count > temp) {
temp = count;
count = 1;
}
else
count =1;
}
}
System.out.println(temp);
}}