結果

問題 No.1416 ショッピングモール
ユーザー ryuusagiryuusagi
提出日時 2021-03-05 21:42:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 62 ms / 1,000 ms
コード長 193 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,036 KB
実行使用メモリ 70,548 KB
最終ジャッジ日時 2024-04-16 09:07:00
合計ジャッジ時間 2,136 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,576 KB
testcase_01 AC 40 ms
53,092 KB
testcase_02 AC 40 ms
52,212 KB
testcase_03 AC 40 ms
52,880 KB
testcase_04 AC 41 ms
53,076 KB
testcase_05 AC 41 ms
52,232 KB
testcase_06 AC 40 ms
52,728 KB
testcase_07 AC 41 ms
53,140 KB
testcase_08 AC 42 ms
53,584 KB
testcase_09 AC 42 ms
52,396 KB
testcase_10 AC 41 ms
52,356 KB
testcase_11 AC 46 ms
59,456 KB
testcase_12 AC 40 ms
52,464 KB
testcase_13 AC 46 ms
59,660 KB
testcase_14 AC 47 ms
60,348 KB
testcase_15 AC 47 ms
60,688 KB
testcase_16 AC 46 ms
60,980 KB
testcase_17 AC 48 ms
60,624 KB
testcase_18 AC 48 ms
61,140 KB
testcase_19 AC 48 ms
61,612 KB
testcase_20 AC 47 ms
61,660 KB
testcase_21 AC 61 ms
70,148 KB
testcase_22 AC 62 ms
70,124 KB
testcase_23 AC 55 ms
70,548 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,*a = map(int, open(0).read().split())
a.sort(reverse=True)
b=0
c=0
for i in range(n):
    for j in range(c,c+2**i):
        b+=a[j]*i
        if j==n-1:
            exit(print(b))
    c+=2**i
0