Олимпиадный тренинг

Задача 39069. Number of pairs - 02


Задача

Темы: ЕГЭ
The file contains a sequence of integers. Sequence elements can take integer values ​​from -10 000 to 10 000 inclusive. Determine the number of pairs in the sequence in which the sum of the numbers is a multiple of three and both numbers are less than the arithmetic mean of all even numbers in the sequence. In your answer, write down the  number of found pairs, then the minimum of the sums of the elements of such pairs (two numbers separated by a space in one line). In this problem, a pair means two successive elements of a sequence.

Assignment file