結果
問題 | No.1416 ショッピングモール |
ユーザー |
|
提出日時 | 2021-03-08 14:59:37 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 65 ms / 1,000 ms |
コード長 | 233 bytes |
コンパイル時間 | 983 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 69,376 KB |
最終ジャッジ日時 | 2024-10-10 01:38:41 |
合計ジャッジ時間 | 2,757 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
n=int(input())A=sorted(list(map(int,input().split())))[::-1]data=[1]i=1while data[-1]<n:data.append(data[-1]+2**i)i+=1ans=0p=1f=0for i in range(n):ans+=A[i]*fif p==data[f]:f+=1p+=1print(ans)