結果
| 問題 |
No.1869 Doubling?
|
| コンテスト | |
| ユーザー |
qwewe
|
| 提出日時 | 2025-04-24 12:20:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| コンパイル時間 | 153 ms |
| コンパイル使用メモリ | 82,324 KB |
| 実行使用メモリ | 59,736 KB |
| 最終ジャッジ日時 | 2025-04-24 12:22:23 |
| 合計ジャッジ時間 | 33,959 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 9 TLE * 11 |
ソースコード
N, M = map(int, input().split())
sum_total = 0
current = 1
for step in range(1, N + 1):
remaining = N - step
if remaining >= 30:
max_x = 1
else:
power = 1 << remaining # 2^remaining
max_x = (M + power - 1) // power
next_val = min(2 * current, max_x)
sum_total += next_val
current = next_val
print(sum_total)
qwewe