結果

問題 No.1416 ショッピングモール
ユーザー brthyyjpbrthyyjp
提出日時 2021-03-05 21:26:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 1,000 ms
コード長 187 bytes
コンパイル時間 205 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 81,280 KB
最終ジャッジ日時 2024-04-16 08:45:42
合計ジャッジ時間 2,415 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
51,712 KB
testcase_01 AC 42 ms
51,712 KB
testcase_02 AC 43 ms
51,712 KB
testcase_03 AC 44 ms
51,712 KB
testcase_04 AC 42 ms
51,840 KB
testcase_05 AC 44 ms
52,992 KB
testcase_06 AC 43 ms
52,096 KB
testcase_07 AC 44 ms
52,352 KB
testcase_08 AC 46 ms
52,864 KB
testcase_09 AC 44 ms
51,712 KB
testcase_10 AC 42 ms
51,712 KB
testcase_11 AC 56 ms
61,824 KB
testcase_12 AC 43 ms
52,096 KB
testcase_13 AC 55 ms
62,336 KB
testcase_14 AC 56 ms
62,464 KB
testcase_15 AC 59 ms
64,640 KB
testcase_16 AC 55 ms
62,336 KB
testcase_17 AC 59 ms
65,536 KB
testcase_18 AC 58 ms
65,152 KB
testcase_19 AC 61 ms
65,664 KB
testcase_20 AC 60 ms
65,024 KB
testcase_21 AC 91 ms
80,384 KB
testcase_22 AC 95 ms
81,280 KB
testcase_23 AC 90 ms
81,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
ans = 0
for i in range(1, n+1):
    a = A[i-1]
    b = format(i, 'b')
    k = len(b)-1
    ans += a*k
print(ans)
0