結果
問題 | No.275 中央値を求めよ |
ユーザー |
|
提出日時 | 2016-02-05 00:16:09 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 13 ms / 1,000 ms |
コード長 | 138 bytes |
コンパイル時間 | 50 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,528 KB |
最終ジャッジ日時 | 2024-06-24 23:42:05 |
合計ジャッジ時間 | 1,623 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
N = input()A = [int(i) for i in raw_input().split()]m = N / 2A.sort()if N % 2:print A[m]else:print (A[m - 1] + A[m]) / 2.0