結果

問題 No.21 平均の差
ユーザー neko_the_shadowneko_the_shadow
提出日時 2016-12-11 23:01:51
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 30 ms / 5,000 ms
コード長 370 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 5,248 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-11-29 04:05:20
合計ジャッジ時間 1,618 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (MAIN)
  (let* ((n (read-line))
         (k (read-line))
         (numbers 
            (let loop ((ls '()) (line (read-line)))
              (if (eof-object? line)
                (reverse ls)
                (loop (cons (string->number line) ls) (read-line))))))
    (display (- (apply max numbers)
                (apply min numbers)))
    (newline)))

(MAIN)
0