結果

問題 No.1416 ショッピングモール
ユーザー nohakai3
提出日時 2022-07-06 16:03:09
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 156 bytes
コンパイル時間 244 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 15,500 KB
最終ジャッジ日時 2024-12-21 18:11:21
合計ジャッジ時間 2,049 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

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