Saturday, April 28, 2012

Size Contest

( https://www.spoj.pl/problems/SIZECON/ )
#include <stdio.h>
int a,s;
int main(n){
    for(scanf("%d",&a);
        a--;
        scanf("%d",&n),
        s+=(n>0)*n);
    printf("%d",s);
return 0;
}

No comments:

Post a Comment