結果

問題 No.275 中央値を求めよ
ユーザー go_boardwalk
提出日時 2017-03-31 13:38:33
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 42 ms / 1,000 ms
コード長 304 bytes
コンパイル時間 131 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 17,536 KB
最終ジャッジ日時 2024-06-25 00:26:01
合計ジャッジ時間 3,070 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

(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