public static void main(String[] args) { Task2 test = new Task2(); int[] A = {4, 5, 1, 1, 1, 1, 4, 3, 1}; int result = test.solution2(A); System.out.println(result); A = new int[] {1, 2, 1, 18, 91, 12}; result = test.solution(A); System.out.println(result); }