Given an array of N elements. Remove the longest sequence of zeros
(there are no sequences of the same length).
The first line contains the number N (1<=N<=20) - 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 No. |
Input data |
Imprint |
1 |
5
1 0 2 0 0
|
1 0 2
|
2 |
6
4 0 0 0 3 0
|
4 3 0
|