結果
| 問題 |
No.1416 ショッピングモール
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-03-05 21:27:45 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 59 ms / 1,000 ms |
| コード長 | 227 bytes |
| コンパイル時間 | 332 ms |
| コンパイル使用メモリ | 81,664 KB |
| 実行使用メモリ | 70,912 KB |
| 最終ジャッジ日時 | 2024-10-07 00:30:00 |
| 合計ジャッジ時間 | 2,053 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
n = int(input())
*a, = map(int,input().split())
a.sort(reverse=1)
c = ans = 0
for k in range(20):
d = 1<<k
for i in range(c,c+d):
if i >= n: break
ans += a[i]*k
c += d
if c >= n: break
print(ans)
convexineq