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.
t – number of test cases [t < 1000]
On each of next t lines given a integer N [-1000 <= N <= 1000]
One integer equals to sum of all positive integers.
Score equals to size of source code of your program except symbols with ASCII code <= 32.
Input: 4 5 -5 6 -1 Output: 11
|Added by:||Roman Sol|
|Cluster:||Cube (Intel Pentium G860 3GHz)|
|Languages:||All except: ERL JS NODEJS PERL 6 VB.net WSPC|
|Resource:||ZCon & RSDN|
90 in bash :)
@SaiAvinash You must to be kidding , the lower the score the better it is , score is counted based on size of the code , the reason you have got such high code after adding fastio method is due to increase in code size.
Do i really have to give "return 0" for C ?
+so_what it means that the it will not count any ascii control (like newline and eof flag) characters.
got 95 with c++Last edit: 2015-06-22 18:18:50
got 134 with Pascal
79 with Python 2.7.9 LOL
134 using while( t-- ) and score 142 using for ( i = 0; i < n; i++ )
Sai Avinash Duddupudi:
wow ... got a score of 2834 after using fasterio methods :)
im new to spoj , solved this problem recently and got 173 marks (idk whether 173 marks are good or bad)