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
2014-12-01 22:07:48 Piotr KÄ…kol
You print 0 all the time.
2014-07-12 16:12:46 black MaMbA
can you please have a look at my submission - 11934428,and tell me where am i going wrong
2014-05-26 03:45:40 Dominique VAILLANT
@Mitch: 16 in Ruby! "I see it but I don't believe," Cantor.
2013-11-17 16:08:13 Mitch Schwartz
Note: There may be more than t integers given, so you must use the value of t to get accepted. While I consider this a bug, everyone in the last ~8 years has had to adapt to it, and it wouldn't make sense to try to get it fixed now.

Last edit: 2013-11-19 07:00:44
2011-01-31 16:50:35 [deleted]
@Wendel Scardua
I had the same problem with my code in Pascal (fpc). I tried to compile it with pascal(gpc) and it worked!
2010-12-04 15:21:44 Piotr KÄ…kol
No problem. :-)
If You think it's useful You can always ask to add it. ;-)

Last edit: 2010-12-04 15:21:55
2010-12-04 15:20:31 HWK
Thanks!
2010-12-03 17:18:59 Piotr KÄ…kol
It seems it isn't.
2010-12-03 17:12:40 HWK
Isn't there "xargs" for Bash available?
2010-08-02 18:50:55 Wendel Scardua
Oh, thanks. :)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.