結果
問題 |
No.1416 ショッピングモール
|
ユーザー |
|
提出日時 | 2023-06-25 14:50:13 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 50 ms / 1,000 ms |
コード長 | 213 bytes |
コンパイル時間 | 190 ms |
コンパイル使用メモリ | 82,496 KB |
実行使用メモリ | 70,424 KB |
最終ジャッジ日時 | 2024-07-02 13:20:56 |
合計ジャッジ時間 | 2,181 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
n = int(input()) a = list(reversed(list(sorted(list(map(int, input().split())))))) ret = 0 lim = 2 dig = 0 for i in range(n): if lim == i + 1: dig += 1 lim *= 2 ret += a[i] * dig print(ret)