結果

問題 No.275 中央値を求めよ
ユーザー MOD9cXWdOsRxvPyMOD9cXWdOsRxvPy
提出日時 2022-10-02 19:03:01
言語 Scheme
(Gauche-0.9.13)
結果
AC  
実行時間 55 ms / 1,000 ms
コード長 324 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 17,952 KB
最終ジャッジ日時 2023-08-26 16:43:30
合計ジャッジ時間 5,569 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
17,752 KB
testcase_01 AC 50 ms
17,600 KB
testcase_02 AC 51 ms
17,640 KB
testcase_03 AC 50 ms
17,796 KB
testcase_04 AC 48 ms
17,632 KB
testcase_05 AC 49 ms
17,656 KB
testcase_06 AC 49 ms
17,788 KB
testcase_07 AC 49 ms
17,708 KB
testcase_08 AC 50 ms
17,632 KB
testcase_09 AC 50 ms
17,628 KB
testcase_10 AC 50 ms
17,688 KB
testcase_11 AC 48 ms
17,760 KB
testcase_12 AC 49 ms
17,580 KB
testcase_13 AC 49 ms
17,460 KB
testcase_14 AC 49 ms
17,384 KB
testcase_15 AC 48 ms
17,732 KB
testcase_16 AC 50 ms
17,876 KB
testcase_17 AC 50 ms
17,868 KB
testcase_18 AC 51 ms
17,888 KB
testcase_19 AC 50 ms
17,844 KB
testcase_20 AC 50 ms
17,852 KB
testcase_21 AC 55 ms
17,648 KB
testcase_22 AC 50 ms
17,768 KB
testcase_23 AC 49 ms
17,828 KB
testcase_24 AC 51 ms
17,560 KB
testcase_25 AC 50 ms
17,844 KB
testcase_26 AC 51 ms
17,700 KB
testcase_27 AC 50 ms
17,676 KB
testcase_28 AC 49 ms
17,624 KB
testcase_29 AC 50 ms
17,568 KB
testcase_30 AC 50 ms
17,764 KB
testcase_31 AC 49 ms
17,684 KB
testcase_32 AC 50 ms
17,696 KB
testcase_33 AC 49 ms
17,712 KB
testcase_34 AC 49 ms
17,648 KB
testcase_35 AC 50 ms
17,700 KB
testcase_36 AC 50 ms
17,832 KB
testcase_37 AC 51 ms
17,612 KB
testcase_38 AC 51 ms
17,632 KB
testcase_39 AC 50 ms
17,780 KB
testcase_40 AC 52 ms
17,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env gosh

(use scheme.sort)

(define (med v)
  (inexact (vector-find-median < v 0))
  )

(define (str->vec str)
  (list->vector
   (map (^x (string->number x))
	(string-split str " ")))
  )

(define (main _)
  (let* ([_ (read-line)]
	 [str (read-line)])
    (display (med (str->vec str)))
    )
  (newline)
  0)

0