結果

問題 No.21 平均の差
ユーザー neko_the_shadowneko_the_shadow
提出日時 2016-12-11 23:01:51
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 370 bytes
コンパイル時間 55 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 11,872 KB
最終ジャッジ日時 2023-08-19 11:37:23
合計ジャッジ時間 1,626 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,664 KB
testcase_01 AC 18 ms
11,872 KB
testcase_02 AC 18 ms
11,828 KB
testcase_03 AC 19 ms
11,768 KB
testcase_04 AC 18 ms
11,760 KB
testcase_05 AC 18 ms
11,820 KB
testcase_06 AC 18 ms
11,652 KB
testcase_07 AC 18 ms
11,652 KB
testcase_08 AC 18 ms
11,760 KB
testcase_09 AC 18 ms
11,672 KB
権限があれば一括ダウンロードができます

ソースコード

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