結果

問題 No.275 中央値を求めよ
コンテスト
ユーザー go_boardwalk
提出日時 2017-03-31 13:38:33
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 30 ms / 1,000 ms
コード長 304 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 45 ms
コンパイル使用メモリ 7,972 KB
実行使用メモリ 17,664 KB
最終ジャッジ日時 2026-03-11 04:42:34
合計ジャッジ時間 2,354 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(define nu (read-line))
(define ns (read-line))

(print ((lambda (l n) (if (odd? n)
                          (list-ref l (div n 2))
                          (/ (+ (list-ref l (- (div n 2) 1)) (list-ref l (div n 2))) 2.0)))
        (sort (map string->number (string-split ns " "))) (string->number nu)))
0