結果
問題 | No.275 中央値を求めよ |
ユーザー |
![]() |
提出日時 | 2020-05-03 01:53:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 1,000 ms |
コード長 | 205 bytes |
コンパイル時間 | 277 ms |
コンパイル使用メモリ | 82,360 KB |
実行使用メモリ | 54,144 KB |
最終ジャッジ日時 | 2025-01-02 10:53:11 |
合計ジャッジ時間 | 3,343 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
import sys input = sys.stdin.buffer.readline N = int(input()) - 1 a = sorted(list(map(int, input().split()))) if N % 2 != 0: print('{:1}'.format((a[N//2] + a[N//2 +1]) / 2)) else: print(a[N//2])