結果

問題 No.275 中央値を求めよ
ユーザー syysyy
提出日時 2021-06-19 12:07:12
言語 Ruby
(3.3.0)
結果
RE  
実行時間 -
コード長 124 bytes
コンパイル時間 76 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 15,404 KB
最終ジャッジ日時 2023-09-05 00:44:35
合計ジャッジ時間 5,010 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 WA -
testcase_09 WA -
testcase_10 RE -
testcase_11 WA -
testcase_12 RE -
testcase_13 WA -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 WA -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 WA -
testcase_24 RE -
testcase_25 RE -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 RE -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 RE -
testcase_38 RE -
testcase_39 WA -
testcase_40 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.chomp.split.map(&:to_i).sort
if n % 2 == 0
  puts ([n/2+1] + [n/2]) / 2.to_f
else
  puts a = n/2 
end
0