結果
問題 |
No.275 中央値を求めよ
|
ユーザー |
|
提出日時 | 2016-02-04 14:49:25 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 13 ms / 1,000 ms |
コード長 | 187 bytes |
コンパイル時間 | 61 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 6,400 KB |
最終ジャッジ日時 | 2024-06-24 23:42:01 |
合計ジャッジ時間 | 1,801 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
ソースコード
#coding: utf-8 ##yuki_275 n=int(raw_input()) s=[] s=map(int,raw_input().split()) ls=list(s) lsr=ls[:n] lsr.sort() if n%2==0: print (lsr[n/2-1]+lsr[n/2])/2.0 else: print lsr[(n-1)/2]