結果

問題 No.1416 ショッピングモール
ユーザー m-fukuzaki325m-fukuzaki325
提出日時 2022-02-03 07:00:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 49 ms / 1,000 ms
コード長 333 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 13,860 KB
最終ジャッジ日時 2023-09-02 03:03:55
合計ジャッジ時間 1,993 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,844 KB
testcase_01 AC 16 ms
7,824 KB
testcase_02 AC 15 ms
7,840 KB
testcase_03 AC 15 ms
7,852 KB
testcase_04 AC 15 ms
7,760 KB
testcase_05 AC 15 ms
7,832 KB
testcase_06 AC 15 ms
7,868 KB
testcase_07 AC 15 ms
7,828 KB
testcase_08 AC 16 ms
7,880 KB
testcase_09 AC 15 ms
7,868 KB
testcase_10 AC 15 ms
7,768 KB
testcase_11 AC 17 ms
8,312 KB
testcase_12 AC 16 ms
7,768 KB
testcase_13 AC 17 ms
8,504 KB
testcase_14 AC 18 ms
8,516 KB
testcase_15 AC 21 ms
8,832 KB
testcase_16 AC 18 ms
8,532 KB
testcase_17 AC 21 ms
8,900 KB
testcase_18 AC 20 ms
8,952 KB
testcase_19 AC 21 ms
8,892 KB
testcase_20 AC 20 ms
8,996 KB
testcase_21 AC 49 ms
12,940 KB
testcase_22 AC 48 ms
12,848 KB
testcase_23 AC 46 ms
13,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
AArr = map(int, input().split())

AArrSort = sorted(AArr, reverse=True)
cost = 0
current = 0
for i in range(n+1):
    for j in range(2 ** i):
        if n == current: 
            break
        else :
            cost += i * AArrSort[current]
            current += 1
    if n == current: 
        break

print(cost)
0