結果
問題 |
No.1416 ショッピングモール
|
ユーザー |
![]() |
提出日時 | 2021-03-05 23:00:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 72 ms / 1,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 99 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 15,752 KB |
最終ジャッジ日時 | 2024-10-07 04:25:09 |
合計ジャッジ時間 | 1,910 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
# 1416 n=int(input()) a=list(map(int,input().split())) floor=0 cost=0 i=0 isOverN=False a.sort(reverse=True) while(True): for _ in range(2**floor): cost+=a[i]*floor i+=1 if i>=n: isOverN=True break floor+=1 if isOverN==True: break print(cost)