結果
問題 | No.1416 ショッピングモール |
ユーザー |
|
提出日時 | 2021-03-07 20:24:32 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 105 ms / 1,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 337 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 16,028 KB |
最終ジャッジ日時 | 2024-10-09 03:21:32 |
合計ジャッジ時間 | 2,492 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
import mathn=int(input())a=sorted(list(map(int,input().split())),reverse=True)L=[[0 for _ in range(2**i)] for i in range(int(math.log(n,2))+1)]for i in range(1,n+1):L[int(math.log(i,2))][i-2**int(math.log(i,2))]=a[i-1]ans=0for i in range(len(L)):ans+=sum(L[i])*iprint(ans)