結果
問題 | No.198 キャンディー・ボックス2 |
ユーザー |
|
提出日時 | 2020-09-21 11:14:46 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 160 ms / 1,000 ms |
コード長 | 183 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 82,252 KB |
実行使用メモリ | 88,588 KB |
最終ジャッジ日時 | 2024-06-24 11:28:52 |
合計ジャッジ時間 | 6,151 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
B = int(input()) N = int(input()) C = [int(input()) for i in range(N)] import statistics x = min(statistics.median_low(C), (sum(C) + B) // N) print(sum([abs(c - x) for c in C]))