結果
| 問題 | No.198 キャンディー・ボックス2 |
| コンテスト | |
| ユーザー |
n_knuu
|
| 提出日時 | 2015-04-29 01:51:46 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 1,000 ms |
| + 817µs | |
| コード長 | 168 bytes |
| 記録 | |
| コンパイル時間 | 307 ms |
| コンパイル使用メモリ | 21,412 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-07-16 23:32:04 |
| 合計ジャッジ時間 | 5,311 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 27 |
ソースコード
B = int(input()) N = int(input()) C = [int(input()) for _ in range(N)] C.sort() sumC = B + sum(C) t = min(sumC//N, C[N//2]) ans = sum(abs(x - t) for x in C) print(ans)
n_knuu