結果
| 問題 |
No.1416 ショッピングモール
|
| コンテスト | |
| ユーザー |
hebizo
|
| 提出日時 | 2021-05-26 02:15:15 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 1,000 ms |
| コード長 | 224 bytes |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 15,512 KB |
| 最終ジャッジ日時 | 2024-10-14 17:16:43 |
| 合計ジャッジ時間 | 2,026 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
n = int(input())
list_a = list(map(int, input().split()))
list_a = sorted(list_a)
list_a.reverse()
cost = 0
f = 0
m = 0
for i in list_a:
cost = cost + i * f
m += 1
if m == 2**(f+1) - 1:
f += 1
print(cost)
hebizo