結果

問題 No.1416 ショッピングモール
ユーザー vwxyzvwxyz
提出日時 2022-09-06 18:02:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 267 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 27,984 KB
最終ジャッジ日時 2024-05-01 14:07:36
合計ジャッジ時間 2,733 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
23,920 KB
testcase_01 AC 59 ms
23,788 KB
testcase_02 AC 57 ms
23,880 KB
testcase_03 AC 55 ms
23,796 KB
testcase_04 AC 55 ms
23,720 KB
testcase_05 AC 56 ms
23,832 KB
testcase_06 AC 57 ms
23,796 KB
testcase_07 AC 56 ms
23,936 KB
testcase_08 AC 59 ms
23,816 KB
testcase_09 AC 57 ms
23,784 KB
testcase_10 AC 56 ms
23,780 KB
testcase_11 AC 60 ms
24,160 KB
testcase_12 AC 58 ms
23,868 KB
testcase_13 AC 59 ms
23,964 KB
testcase_14 AC 58 ms
24,288 KB
testcase_15 AC 61 ms
24,324 KB
testcase_16 AC 57 ms
24,132 KB
testcase_17 AC 61 ms
24,472 KB
testcase_18 AC 61 ms
24,460 KB
testcase_19 AC 63 ms
24,556 KB
testcase_20 AC 64 ms
24,420 KB
testcase_21 AC 89 ms
27,732 KB
testcase_22 AC 92 ms
27,984 KB
testcase_23 AC 83 ms
27,812 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