結果
問題 |
No.275 中央値を求めよ
|
ユーザー |
![]() |
提出日時 | 2016-01-23 17:07:47 |
言語 | Python2 (2.7.18) |
結果 |
WA
|
実行時間 | - |
コード長 | 244 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 6,912 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-09-21 15:04:12 |
合計ジャッジ時間 | 1,692 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 38 |
ソースコード
# -*- coding: utf-8 -*- __author__ = 'yuuki' #No.275 中央値を求めよ N = input() NL = map(int,raw_input().split()) NL.sort() print NL if len(NL) % 2 == 0: print (NL[len(NL)/2] + NL[len(NL)/2 - 1]) / 2.0 else: print NL[len(NL)/2]