fork(1) download
  1. s,x="%d";
  2. main(a,t){
  3. for(scanf(x,&t);t--&&scanf(x,&a);)
  4. s+=(a>0)*a;
  5. printf(x,s);
  6. }
Success #stdin #stdout 0s 2012KB
stdin
4
5
-5
6
-1
stdout
11