結果

問題 No.1416 ショッピングモール
ユーザー gorugo30gorugo30
提出日時 2021-03-05 21:25:31
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 218 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 76,544 KB
最終ジャッジ日時 2024-04-16 08:44:40
合計ジャッジ時間 2,639 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
51,712 KB
testcase_01 AC 43 ms
51,840 KB
testcase_02 AC 43 ms
51,840 KB
testcase_03 AC 43 ms
51,968 KB
testcase_04 AC 43 ms
51,840 KB
testcase_05 AC 43 ms
51,968 KB
testcase_06 AC 42 ms
52,096 KB
testcase_07 AC 42 ms
51,712 KB
testcase_08 AC 43 ms
52,352 KB
testcase_09 AC 42 ms
51,712 KB
testcase_10 AC 42 ms
51,968 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 50 ms
59,008 KB
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
pow2 = 1
ans = 0
A = list(map(int, input().split()))
A.sort(reverse = True)
x = 0
f = 0
while x < N:
    for i in range(pow2):
        ans += f * A[x]
        x += 1
    f += 1
    pow2 *= 2
print(ans)
0