結果

問題 No.1416 ショッピングモール
ユーザー vwxyzvwxyz
提出日時 2022-09-06 18:02:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 83 ms / 1,000 ms
コード長 267 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 26,756 KB
最終ジャッジ日時 2023-08-14 00:58:18
合計ジャッジ時間 3,171 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
22,136 KB
testcase_01 AC 51 ms
22,112 KB
testcase_02 AC 51 ms
22,032 KB
testcase_03 AC 51 ms
22,064 KB
testcase_04 AC 52 ms
22,064 KB
testcase_05 AC 53 ms
22,196 KB
testcase_06 AC 52 ms
22,104 KB
testcase_07 AC 52 ms
22,116 KB
testcase_08 AC 53 ms
22,168 KB
testcase_09 AC 51 ms
22,060 KB
testcase_10 AC 52 ms
22,164 KB
testcase_11 AC 53 ms
22,204 KB
testcase_12 AC 52 ms
22,024 KB
testcase_13 AC 53 ms
22,228 KB
testcase_14 AC 54 ms
22,476 KB
testcase_15 AC 57 ms
22,592 KB
testcase_16 AC 55 ms
22,396 KB
testcase_17 AC 57 ms
22,756 KB
testcase_18 AC 57 ms
22,644 KB
testcase_19 AC 57 ms
22,664 KB
testcase_20 AC 57 ms
22,736 KB
testcase_21 AC 81 ms
26,756 KB
testcase_22 AC 83 ms
25,928 KB
testcase_23 AC 76 ms
26,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from typing import Counter
readline=sys.stdin.readline
write=sys.stdout.write

N=int(readline())
A=sorted(list(map(int,readline().split())),reverse=True)
pow2=[]
for k in range(20):
    pow2+=[k]*(1<<k)
ans=0
for a,p in zip(A,pow2):
    ans+=a*p
print(ans)
0