Sphere Online Judge

SPOJ Problem Set (challenge)

378. Size Contest

Problem code: SIZECON

Given the set of integers, find the sum of all positive integers in it. Solutions can be sent in any language supported by SPOJ except Whitespace.

Input

t – number of test cases [t < 1000]
On each of next t lines given a integer N [-1000 <= N <= 1000]

Output

One integer equals to sum of all positive integers.

Score

Score equals to size of source code of your program except symbols with ASCII code <= 32.

Example

Input:
4
5
-5
6
-1
Output:
11

Added by:Roman Sol
Date:2005-06-23
Time limit:2s
Source limit:10000B
Languages:All except: ERL WSPC TECS JS
Resource:ZCon & RSDN

hide comments
2009-12-22 17:34:33 Przemek Komosa
ERROR in test cases?
"On each of next t lines given a integer..."
Number of lines is greather than 't' ... :\

Last edit: 2009-12-22 17:35:02
SPOJ System © 2008-2010 Sphere Research Labs. All Rights Reserved.