結果

問題 No.1416 ショッピングモール
ユーザー 👑 potato167potato167
提出日時 2022-02-17 00:36:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 90 ms / 1,000 ms
コード長 150 bytes
コンパイル時間 408 ms
コンパイル使用メモリ 87,116 KB
実行使用メモリ 81,728 KB
最終ジャッジ日時 2023-09-11 17:20:08
合計ジャッジ時間 3,378 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,232 KB
testcase_01 AC 70 ms
71,272 KB
testcase_02 AC 69 ms
70,884 KB
testcase_03 AC 71 ms
71,112 KB
testcase_04 AC 69 ms
71,096 KB
testcase_05 AC 73 ms
75,668 KB
testcase_06 AC 70 ms
71,148 KB
testcase_07 AC 73 ms
75,544 KB
testcase_08 AC 75 ms
75,756 KB
testcase_09 AC 70 ms
71,172 KB
testcase_10 AC 70 ms
71,096 KB
testcase_11 AC 80 ms
76,012 KB
testcase_12 AC 75 ms
75,680 KB
testcase_13 AC 76 ms
75,948 KB
testcase_14 AC 75 ms
76,172 KB
testcase_15 AC 78 ms
76,172 KB
testcase_16 AC 77 ms
76,164 KB
testcase_17 AC 76 ms
76,332 KB
testcase_18 AC 77 ms
76,168 KB
testcase_19 AC 77 ms
76,160 KB
testcase_20 AC 76 ms
76,180 KB
testcase_21 AC 90 ms
80,868 KB
testcase_22 AC 90 ms
81,588 KB
testcase_23 AC 85 ms
81,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
A.sort()
ans=0
for i in range(N):
	c=-1
	x=i+1
	while x!=0:
		x//=2
		c+=1
	ans+=c*A[N-1-i]
print(ans)
0