row=0
sum=0
num=0
while read line
do
if [[ row -eq 0 ]]
then
num=${line}
else
((sum+=line))
fi
((row++))
done < nowcoder.txt
echo "scale=3;$sum/$num" | bc
sum=0
num=0
while read line
do
if [[ row -eq 0 ]]
then
num=${line}
else
((sum+=line))
fi
((row++))
done < nowcoder.txt
echo "scale=3;$sum/$num" | bc