fork download
  1. #!/bin/bash
  2.  
  3. read t
  4. for (( i=1; $i <= t; i++ )) do
  5. read n
  6. j=1
  7. for (( j=1; $j <= n; j++ ))
  8. do
  9. read a \c
  10. let w=w+a
  11. done
  12. echo $w
  13. w=0
  14. done
Success #stdin #stdout 0.03s 5312KB
stdin
1
100
-100
stdout
-100