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
2013-05-23 18:46:05 dont know
even now i got 61 as score but my points did not increase.
2013-05-23 11:33:49 VV
Submit any valid python solution for this problem and you too can get a score of 0, obviously till the bug has been fixed.
2013-05-23 00:13:23 Mitch Schwartz
The bug has already been reported to the admins. So far I've noticed spurious 0 scores for this problem, DDATE, and SUMUP. Those solutions will be either rejudged or disqualified (I don't know which) once the bug has been corrected. Thanks for your patience.
2013-05-22 23:24:25 dont know
@admin plz tell why i got '0' in result and green accepted sign where as my code has 61 characters

Last edit: 2013-05-22 23:24:41
2013-04-09 17:16:04 ওয়াসী (Wasi)
i got 54 in python 3.2.3 I wonder how numerix solved it with only 36 chars!!!

Last edit: 2013-06-12 16:06:07
2013-02-27 20:16:10 @looser@
i gt 161 what does it mean
2012-12-24 12:38:22 Atul Kumar Verma
@nikhil the number you get is the total of characters used in code. as small number you get more better is your code.
2012-10-18 14:30:22 gourav
what does 128 means ? 127 is good than 128 or bad ? tell me please!!
2012-10-16 15:02:27 :)
#include
int main(){
int t;
scanf("%d",&t);
int i,a,sum=0;
for(i=0;i {
scanf("%d",&a);
if(a>0)sum+=a;
}
printf("%d",sum);
return 0;
}
what is wrong with this code?
it is giving WA
2012-07-25 18:18:44 Mostafa 36a2
___What A PERL !!!!


Last edit: 2012-08-10 16:13:55
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.