結果
問題 | No.1416 ショッピングモール |
ユーザー |
|
提出日時 | 2021-03-05 21:28:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 59 ms / 1,000 ms |
コード長 | 172 bytes |
コンパイル時間 | 247 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 68,608 KB |
最終ジャッジ日時 | 2024-10-07 00:31:46 |
合計ジャッジ時間 | 1,926 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
N = int(input()) A = list(map(int, input().split())) A.sort(reverse=True) i = 0 f = 0 ans = 0 while i<N: ans += sum(A[i:i+pow(2,f)])*f i += pow(2,f) f += 1 print(ans)