Sum

3

2 votes
Easy
Problem

Given an array of integers, compute the sum of all positive integers.

Input: The first line is t, the number of test cases. For each test case, the first input is n, the size of array, followed by n integers.

Output: For every test case 1 line, the sum of positive integers.

Sample Input
2
5
1 -5 3 -2 3
4
-8 -2 -6 -7
1
Sample Output
7
0
Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?