結果
| 問題 |
No.275 中央値を求めよ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-05-20 19:32:45 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 245 bytes |
| コンパイル時間 | 207 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-09-19 00:30:01 |
| 合計ジャッジ時間 | 2,591 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 38 |
ソースコード
import math n=int(input()) numlist=sorted(list(map(int,input.split()))) length=len(numlist) if length%2==0: low=math.floor(legth/2)-1 high=low+1 mid=(numlist[low]+numlist[high])/2 else: mid=(numlist[math.ceil(length/2)-1]) print(mid)