結果
問題 |
No.609 Noelちゃんと星々
|
ユーザー |
|
提出日時 | 2018-01-29 16:12:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 292 bytes |
コンパイル時間 | 237 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 25,636 KB |
最終ジャッジ日時 | 2024-12-29 18:07:57 |
合計ジャッジ時間 | 7,017 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 25 |
ソースコード
from collections import Counter l=0 n=int(input()) a=list(input().split()) data=Counter(a) ans=data.most_common(1)[0][0] for i in range(n): l+=abs(int(ans)-int(a[i])) sum_i=0 x=0 for i in a: sum_i+=int(i) adv=sum_i//n for i in range(n): x+=abs(adv-int(a[i])) print(min(x,l))