Positives
Given 4 numbers in the input, your task is to calculate the sum of positives. If all the numbers are negative, the output should be 0.
Input | Output |
---|---|
1 3 -1 4 | 8 |
10 -3 -1 40 | 50 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB