#77Easy
Remove odd numbers
Time: 1 s · Memory: 256 MB
- Arrays
Statement
Remove all odd numbers from the array. The order of the remaining elements stays the same.
Input format
The first line contains (). The second line contains integers ().
Output format
The first line contains the number of remaining elements . The second line contains those elements (if , the second line is empty).
Examples
Input
6 3 4 7 9 10 8
Output
3 4 10 8
Input
3 1 3 5
Output
0
Note
Write the even numbers into a new array (or into the front of the same one). Negative odd numbers are odd too: in C++ and Go -7 % 2 is -1, so check x % 2 != 0, not x % 2 == 1.
