結果

問題 No.275 中央値を求めよ
ユーザー kokoa1046
提出日時 2017-09-09 11:00:38
言語 Scheme
(Gauche-0.9.15)
結果
RE  
実行時間 -
コード長 305 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 16,896 KB
最終ジャッジ日時 2024-11-07 09:03:11
合計ジャッジ時間 3,142 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 2 WA * 32 RE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

(use srfi-1)
(define n (read))
(define (readn n)  (if (= n 0) '() (cons (read) (readn (- n 1)) ) ))
(define x (readn n))
(if (even? (length x)) (print(exact->inexact(/ (+  (list-ref x (+(quotient (length x) 2)1) ) (list-ref x (quotient (length x)2) ))2))) (print (list-ref x (+ (quotient (length x)2)1))))
0