Shortest code in python (Spoj SIZECON)
I have been trying this problem [SIZECON][1] at spoj. But i not find the best solution in python.

My solution is uses 46 characters. (and get the 46 score)

Here is my solution:

    c=0
    exec('b=input();c+=b*(b>0);'*input())
    print c

And other solution (but get same score):

    c=0
    for i in input()*[0]:
        b=input()
        c+=b*(b>0)
    print c

But in the [best solution list][2] there are people who solved 29 characters.

Any alternate suggestions to solve the problem?

Related question in stackoverflow:

 - http://stackoverflow.com/questions/2261774/shortest-code-in-c Shortest code in C


  [1]: http://www.spoj.pl/problems/SIZECON/
  [2]: http://www.spoj.pl/ranks/SIZECON/lang=PYTH%202.5
Shortest code in python (Spoj SIZECON)
===

I have been trying this problem [SIZECON][1] at spoj. But i not find the best solution in python.

My solution is uses 46 characters. (and get the 46 score)

Here is my solution:

    c=0
    exec('b=input();c+=b*(b>0);'*input())
    print c

And other solution (but get same score):

    c=0
    for i in input()*[0]:
        b=input()
        c+=b*(b>0)
    print c

But in the [best solution list][2] there are people who solved 29 characters.

Any alternate suggestions to solve the problem?

Related question in stackoverflow:

 - http://stackoverflow.com/questions/2261774/shortest-code-in-c Shortest code in C


  [1]: http://www.spoj.pl/problems/SIZECON/
  [2]: http://www.spoj.pl/ranks/SIZECON/lang=PYTH%202.5