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

hide comments
2015-07-15 12:33:31 Akshay Aradhya
Do i really have to give "return 0" for C ?
2015-06-22 18:21:40 Joonyoung Lee
+so_what it means that the it will not count any ascii control (like newline and eof flag) characters.
2015-06-22 18:00:06 Joonyoung Lee
got 95 with c++

Last edit: 2015-06-22 18:18:50
2015-06-15 11:27:47 Vale
got 134 with Pascal
2015-06-05 11:01:57 Ankush
79 with Python 2.7.9 LOL
2015-04-26 21:22:55 _R0b_
134 using while( t-- ) and score 142 using for ( i = 0; i < n; i++ )
and without using fasterio
2015-03-29 23:06:20 Sai Avinash Duddupudi
wow ... got a score of 2834 after using fasterio methods :)
2015-03-12 22:41:14 keshavsharma
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 :(
2015-02-04 11:20:50 so_what
could anybody explain what it's mean by symbol with ASCII code <= 32? please..
2014-06-30 20:48:01 Divyank Duvedi
Something is wrong with the test file
WA--- while(scanf()>0)
AC---scanf(t) while(t--)

Last edit: 2014-06-30 20:49:58
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.