結果
| 問題 | No.1416 ショッピングモール |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-05 21:25:31 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 218 bytes |
| 記録 | |
| コンパイル時間 | 166 ms |
| コンパイル使用メモリ | 82,536 KB |
| 実行使用メモリ | 76,932 KB |
| 最終ジャッジ日時 | 2024-10-07 00:21:57 |
| 合計ジャッジ時間 | 2,288 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 RE * 12 |
ソースコード
N = int(input())
pow2 = 1
ans = 0
A = list(map(int, input().split()))
A.sort(reverse = True)
x = 0
f = 0
while x < N:
for i in range(pow2):
ans += f * A[x]
x += 1
f += 1
pow2 *= 2
print(ans)