結果
問題 |
No.21 平均の差
|
ユーザー |
![]() |
提出日時 | 2014-11-01 03:02:45 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 302 bytes |
コンパイル時間 | 374 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-12-30 15:51:11 |
合計ジャッジ時間 | 1,363 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 10 |
ソースコード
import heapq import math n = int(input()) k = int(input()) ni = [int(input()) for i in range(n)] h = [] m = [] for i in ni: heapq.heappush(h, -i) for i in ni: heapq.heappush(m, i) print(h, m) nmax = heapq.heappop(h) nmin = heapq.heappop(m) print(math.ceil(-nmax - nmin))