@numbers = <>;
@sorted = sort({$a <=> $b} @numbers);
$max = pop(@sorted);
$min = shift(@sorted);

$sum = 0;
foreach $x (@sorted){
    $sum += $x;
}
print "最大値 = $max";
print "最小値 = $min";
print "その他の合計 = $sum\n";
