結果

問題 No.275 中央値を求めよ
ユーザー pajannatpajannat
提出日時 2021-04-04 16:00:32
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 205 bytes
コンパイル時間 308 ms
コンパイル使用メモリ 87,300 KB
実行使用メモリ 71,712 KB
最終ジャッジ日時 2023-08-27 16:51:11
合計ジャッジ時間 4,548 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 70 ms
71,128 KB
testcase_04 AC 69 ms
71,304 KB
testcase_05 WA -
testcase_06 AC 69 ms
71,284 KB
testcase_07 AC 69 ms
71,340 KB
testcase_08 AC 70 ms
71,088 KB
testcase_09 AC 70 ms
71,240 KB
testcase_10 WA -
testcase_11 AC 68 ms
71,512 KB
testcase_12 AC 69 ms
71,436 KB
testcase_13 AC 69 ms
71,284 KB
testcase_14 AC 69 ms
71,356 KB
testcase_15 WA -
testcase_16 AC 70 ms
71,600 KB
testcase_17 AC 70 ms
71,308 KB
testcase_18 WA -
testcase_19 AC 69 ms
71,088 KB
testcase_20 AC 69 ms
71,148 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 69 ms
71,088 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 70 ms
71,540 KB
testcase_27 AC 70 ms
71,468 KB
testcase_28 AC 68 ms
71,368 KB
testcase_29 AC 69 ms
71,092 KB
testcase_30 AC 68 ms
71,636 KB
testcase_31 AC 68 ms
71,528 KB
testcase_32 AC 69 ms
71,252 KB
testcase_33 AC 68 ms
71,244 KB
testcase_34 AC 69 ms
71,040 KB
testcase_35 AC 69 ms
71,240 KB
testcase_36 AC 70 ms
71,276 KB
testcase_37 AC 70 ms
71,276 KB
testcase_38 AC 70 ms
71,424 KB
testcase_39 AC 70 ms
71,536 KB
testcase_40 AC 69 ms
71,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())
A = map(int,input().split())

# 昇順ソート
A = sorted(A)

if N % 2 == 0:
	print(int((A[(N-1) // 2] + A[math.ceil((N-1) / 2)]) / 2))
else:
	print(A[int(N / 2)])
0