fork download
  1. #!/bin/bash
  2.  
  3. f() {
  4. printf %$#d $@
  5. }
  6.  
  7. for testcase in \
  8. "0" \
  9. "1" \
  10. "2 3" \
  11. "2 10" \
  12. "4 5 6" \
  13. "17 19 20" \
  14. "7 8 9 10" \
  15. "100 200 300 0" \
  16. "1000 400 30 7" \
  17. "1 33 333 7777" \
  18. "0 0 0 0 0 0" ; do
  19. f $testcase
  20. echo
  21. done
Success #stdin #stdout 0s 5092KB
stdin
Standard input is empty
stdout
0
1
 2 3
 210
  4  5  6
 17 19 20
   7   8   9  10
 100 200 300   0
1000 400  30   7
   1  33 3337777
     0     0     0     0     0     0