結果

問題 No.21 平均の差
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-06-02 21:14:00
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 399 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 11,920 KB
最終ジャッジ日時 2023-09-20 18:51:49
合計ジャッジ時間 1,121 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
11,712 KB
testcase_01 AC 17 ms
11,888 KB
testcase_02 AC 18 ms
11,688 KB
testcase_03 AC 18 ms
11,688 KB
testcase_04 AC 17 ms
11,920 KB
testcase_05 AC 18 ms
11,900 KB
testcase_06 AC 18 ms
11,704 KB
testcase_07 AC 19 ms
11,868 KB
testcase_08 AC 18 ms
11,680 KB
testcase_09 AC 17 ms
11,680 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define n (string->number (read-line)))
(define k (string->number (read-line)))
(define (iterate0-n n)
  (let ((res (list 1)))
    (let loop ((i n) (p res))
      (if (< i 1)
        (cdr res)
        (begin
          (set-cdr! p (list (string->number (read-line))))
          (loop (- i 1) (cdr p)))))))

(define a (iterate0-n n))
(sort! a)
(define res (- (last a) (car a)))
(display res)
(newline)
0