4 lines
121 B
Bash
4 lines
121 B
Bash
|
#!/bin/sh
|
||
|
paste -sd+ /dev/stdin | sed 's/++/\n/g' | bc | sort -n
|
||
|
# ./main.sh < input2.txt | tail -3 | paste -sd+ - | bc
|