結果

問題 No.21 平均の差
コンテスト
ユーザー neko_the_shadow
提出日時 2016-12-11 23:01:51
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 17 ms / 5,000 ms
+ 873µs
コード長 370 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3 ms
コンパイル使用メモリ 7,852 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2026-10-01 19:05:52
合計ジャッジ時間 1,913 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(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