結果

問題 No.1416 ショッピングモール
ユーザー nohakai3nohakai3
提出日時 2022-07-06 16:03:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 56 ms / 1,000 ms
コード長 156 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,672 KB
実行使用メモリ 13,884 KB
最終ジャッジ日時 2023-08-23 14:15:45
合計ジャッジ時間 2,053 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,084 KB
testcase_01 AC 16 ms
8,056 KB
testcase_02 AC 16 ms
8,232 KB
testcase_03 AC 16 ms
8,144 KB
testcase_04 AC 16 ms
8,168 KB
testcase_05 AC 17 ms
8,096 KB
testcase_06 AC 16 ms
8,212 KB
testcase_07 AC 17 ms
8,052 KB
testcase_08 AC 16 ms
8,188 KB
testcase_09 AC 16 ms
8,180 KB
testcase_10 AC 16 ms
8,060 KB
testcase_11 AC 19 ms
8,420 KB
testcase_12 AC 17 ms
8,120 KB
testcase_13 AC 19 ms
8,464 KB
testcase_14 AC 20 ms
8,532 KB
testcase_15 AC 22 ms
9,148 KB
testcase_16 AC 20 ms
8,544 KB
testcase_17 AC 23 ms
9,252 KB
testcase_18 AC 22 ms
9,232 KB
testcase_19 AC 24 ms
9,272 KB
testcase_20 AC 22 ms
9,060 KB
testcase_21 AC 55 ms
12,916 KB
testcase_22 AC 56 ms
12,776 KB
testcase_23 AC 52 ms
13,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
A=list(map(int,input().split()))
A.sort(reverse=True)
ans=0
from math import log2
for i in range(n):
    ans+=int(log2(i+1))*A[i]

print(ans)
0