結果

問題 No.1416 ショッピングモール
ユーザー mesame3993mesame3993
提出日時 2021-10-06 12:01:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 164 ms / 1,000 ms
コード長 195 bytes
コンパイル時間 980 ms
コンパイル使用メモリ 86,852 KB
実行使用メモリ 235,264 KB
最終ジャッジ日時 2023-09-30 08:42:26
合計ジャッジ時間 6,096 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
228,740 KB
testcase_01 AC 150 ms
228,552 KB
testcase_02 AC 146 ms
228,760 KB
testcase_03 AC 147 ms
228,488 KB
testcase_04 AC 150 ms
228,712 KB
testcase_05 AC 150 ms
228,836 KB
testcase_06 AC 149 ms
228,608 KB
testcase_07 AC 149 ms
228,664 KB
testcase_08 AC 147 ms
228,656 KB
testcase_09 AC 148 ms
228,680 KB
testcase_10 AC 147 ms
228,580 KB
testcase_11 AC 153 ms
229,856 KB
testcase_12 AC 145 ms
228,608 KB
testcase_13 AC 146 ms
229,160 KB
testcase_14 AC 153 ms
229,416 KB
testcase_15 AC 153 ms
229,240 KB
testcase_16 AC 152 ms
229,276 KB
testcase_17 AC 155 ms
229,312 KB
testcase_18 AC 156 ms
229,188 KB
testcase_19 AC 156 ms
229,196 KB
testcase_20 AC 153 ms
229,248 KB
testcase_21 AC 164 ms
234,016 KB
testcase_22 AC 161 ms
235,264 KB
testcase_23 AC 162 ms
234,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
ans = 0
f = []
for i in range(21):
	for j in range(2**i):
		f.append(i)
for i in range(n):
	ans += a[i] * f[i]
print(ans)
0