Add everything I got

This commit is contained in:
2023-12-01 14:20:13 +01:00
parent e2343da168
commit 7d709d6f24
13 changed files with 424 additions and 1 deletions

26
1b.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
max1=0
max2=0
max3=0
c=0
while read a; do
if [[ -n "$a" ]]; then
let c+=$a
else
if [[ $c -gt $max1 ]]; then
max3=$max2
max2=$max1
max1=$c
elif [[ $c -gt $max2 ]]; then
max3=$max2
max2=$c
elif [[ $c -gt $max3 ]]; then
max3=$c
fi
c=0
fi
done
echo $(( $max1 + $max2 + $max3 ))