Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class iliev {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n = scan.nextInt();
- int[] array = new int[n];
- }
- private static int seqnum(int[] array) {
- int count = 1;
- int max = 1;
- for (int i = 1; i < array.length; i++) {
- if (array[i] == array[i - 1]) {
- count++;
- } else {
- count = 1;
- }
- if (count > max) {
- max = count;
- }
- System.out.println(seqnum(array));
- }
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement