SIZECON - Size Contest

no tags 

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

hide comments
Alessandro Amici: 2014-02-23 16:45:42

28, Yes! Hallvard Norheim Bø, I must admit I would not have thought less than 29 for python 2 was possible without seeing your score.

Last edit: 2014-02-23 16:46:08
leafmoon: 2014-01-18 09:33:46

@Mitch Schwartz Thank you. Hopefully I get 44 in Ruby.

Mitch Schwartz: 2013-11-17 16:06:05

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:21
Satyam Vijay: 2013-11-06 22:46:48

using while(t--) gives ac but while(cin>>n) gives wrong answer. Is there something wrong with the test file?

Anshuman Tiwari: 2013-08-06 05:31:32

My score(6/59) hasn't been reflected, Could you tell me what's wrong? Thanks.

Last edit: 2013-08-06 05:33:19
Mitch Schwartz: 2013-08-02 10:46:45

@Sayan Nayak: Calculation of points is explained at the bottom of the user rankings pages. For this problem where the top score is 6, a score of 242 will result in 6/242 (less than 0.03) points.

SAYAN NAYAK: 2013-08-02 07:18:57

I got 242.But my points didn't increase :(.What to do?I'm new in SPOJ

Mostafa 36a2: 2013-07-24 01:39:42

5 days learning AWK and then !
Best AWK Code in Awk ranks :D
thanks GOD

dont know: 2013-05-23 18:46:05

even now i got 61 as score but my points did not increase.

VV: 2013-05-23 11:33:49

Submit any valid python solution for this problem and you too can get a score of 0, obviously till the bug has been fixed.


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 VB.NET WHITESPACE
Resource:ZCon & RSDN