結果
| 問題 |
No.1869 Doubling?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-11 22:06:00 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 209 bytes |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2024-09-16 02:23:17 |
| 合計ジャッジ時間 | 3,503 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 WA * 5 |
ソースコード
N, M = map(int, input().split())
res = []
now = M
while now > 1:
res.append(now)
now = (now + 1) // 2
res.reverse()
if len(res) <= N:
print(sum(res) + N - len(res))
else:
print(pow(2, N) - 1)