SIZECON - Size Contest

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
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 SCM qobi VB.NET WHITESPACE
Resource:ZCon & RSDN

hide comments
2010-07-26 13:22:54 Piotr KÄ…kol
Maybe for this test Your print wrong answer:
4
5
-5
6
-1
7
Correct answer is still 11, not 18.
2010-07-25 18:00:59 Wendel Scardua
I don't get why my code is giving wrong answer. I tried even a longer code, just to be sure.

And yes, my code prints 11 for this sample input.
2010-06-19 07:30:53 intellectual
4 is no of test cases
2010-02-27 13:39:27 Wolfram
don't add t
2010-02-27 09:19:54 TRiBLy
I don't know...since when is 4+5+6 = 11?
Or do i not understand the problem?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.