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

Задача 10385. Error


Given an array of N elements.  Delete elements at the beginning and end until the sum of the array is a multiple of 5 (first the first, then the last, etc.).

The first line contains the number N (1<=N<=15)  - the number of elements of a one-dimensional array
The second line contains N integers (numbers are entered from the keyboard)

Sample input and output
Test number Input Output
1 4
2 6 4 5
6 4

Запрещенные операторы:del;pop