結果
問題 | No.275 中央値を求めよ |
ユーザー |
![]() |
提出日時 | 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 |
ソースコード
(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)))