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