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
hide comments
randomabraham:
2024-09-20 17:17:22
got it down to 90
|
|
randomabraham:
2024-09-20 16:20:03
100 in c++\
|
|
Alessandro Amici:
2024-03-10 00:02:22
@dingledooper1 I came back to this problem today and I saw your 16, chapeau! You were right, I had missed a simple improvement of my 20 solution two years ago :facepalm: i can't belive this puzle is still this fun after 10 years :) |
|
dung_t_nguyen:
2023-07-13 06:21:10
2196 in c++, what does this mean?
|
|
trifun:
2023-06-12 01:10:07
173 C++ |
|
dingledooper1:
2022-07-17 04:37:21
@Alessandro Amici Wow, very clever! I would never have thought that the score could get this low. Well soon after getting 20, i managed to lower it to 16 (24 in py3). I believe you're close, but still missing something ;) |
|
Alessandro Amici:
2022-04-03 17:17:14
8 years after my last best score with python 2 and 3 (28 and 31) I had a new idea: I'm in awe as I managed to do 20 with python 2 and 28 with python 3! |
|
saswatpanda:
2021-10-01 10:27:43
111 in python3 |
|
adhithyasriniv:
2020-09-27 13:16:06
113 in python for me |
|
manxmaniac:
2020-08-21 17:09:34
134 c++ what does this mean? |
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 |