結果

問題 No.1416 ショッピングモール
ユーザー paruf4paruf4
提出日時 2021-03-05 21:39:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 1,000 ms
コード長 238 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 69,880 KB
最終ジャッジ日時 2024-04-16 09:04:36
合計ジャッジ時間 2,048 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,432 KB
testcase_01 AC 38 ms
52,388 KB
testcase_02 AC 38 ms
52,772 KB
testcase_03 AC 38 ms
52,440 KB
testcase_04 AC 38 ms
52,408 KB
testcase_05 AC 39 ms
52,208 KB
testcase_06 AC 39 ms
52,884 KB
testcase_07 AC 40 ms
53,816 KB
testcase_08 AC 40 ms
52,808 KB
testcase_09 AC 40 ms
52,220 KB
testcase_10 AC 38 ms
52,292 KB
testcase_11 AC 46 ms
61,568 KB
testcase_12 AC 39 ms
52,212 KB
testcase_13 AC 43 ms
60,220 KB
testcase_14 AC 43 ms
59,468 KB
testcase_15 AC 44 ms
61,232 KB
testcase_16 AC 43 ms
61,044 KB
testcase_17 AC 45 ms
61,348 KB
testcase_18 AC 44 ms
61,092 KB
testcase_19 AC 44 ms
61,180 KB
testcase_20 AC 45 ms
61,468 KB
testcase_21 AC 55 ms
68,784 KB
testcase_22 AC 58 ms
69,880 KB
testcase_23 AC 51 ms
69,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
a.sort()
res = 0
count = 0
for i in range(n):
    for j in range(2**i):
        res += i*a[n-1-count]
        count += 1
        if count == n:
            print(res)
            exit(0)
0