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

Added by:Roman Sol
Date:2005-06-23
Time limit:2s
Source limit:10000B
Memory limit:1536MB
Cluster: Cube (Intel Pentium G860 3GHz)
Languages:All except: ERL JS NODEJS PERL 6 SCM chicken VB.net WSPC
Resource:ZCon & RSDN

hide comments
Sai Avinash Duddupudi: 2015-03-29 23:06:20

wow ... got a score of 2834 after using fasterio methods :)

keshavsharma: 2015-03-12 22:41:14

im new to spoj , solved this problem recently and got 173 marks (idk whether 173 marks are good or bad)
but when i checked out my profile, the number of successful submissions are not increasing
but total submissions are increasing every time :(

so_what: 2015-02-04 11:20:50

could anybody explain what it's mean by symbol with ASCII code <= 32? please..

Divyank Duvedi: 2014-06-30 20:48:01

Something is wrong with the test file
WA--- while(scanf()>0)
AC---scanf(t) while(t--)

Last edit: 2014-06-30 20:49:58
pvkcse: 2014-05-11 15:11:45

i have got 351 with c# but there is no effect in my score...I'm new to spoj...

Hallvard Norheim Bø: 2014-02-23 21:01:31

Alessandro: congratulations!
Strange that I did not find this solution earlier,
as I used the same idea in a challenge on another site over a year ago...

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?