~/algor $ cat problems/massiv-manfiylarni-nolga
Replace negatives with zero
Easy
1000 ms
128 MB
24%
A positive integer $n$ and an array of $n$ integers are given. Replace all negative elements with $0$ and print the resulting array.
Input
The first line contains a positive integer $n$. The second line contains $n$ integers separated by spaces.
Output
One line with $n$ integers separated by spaces.
Note
$1 \le n \le 10^{4}$
$-1000 \le a_{i} \le 1000$
Examples
Input #1
5 3 -1 0 -7 2
Output #1
3 0 0 0 2
Input #2
2 -5 -5
Output #2
0 0