結果
| 問題 | No.2393 Bit Grid Connected Component |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-29 00:30:08 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 564 ms / 2,000 ms |
| + 308µs | |
| コード長 | 312 bytes |
| 記録 | |
| コンパイル時間 | 297 ms |
| コンパイル使用メモリ | 80,512 KB |
| 実行使用メモリ | 93,184 KB |
| 最終ジャッジ日時 | 2026-09-11 08:22:00 |
| 合計ジャッジ時間 | 4,477 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 20 |
ソースコード
T = int(input())
ans = []
for _ in range(T):
x, y = list(map(int, input().split()))
y_max = y
while True:
x_bin = format(x, 'b')[::-1]
if y_max > len(x_bin)-1 or x_bin[y_max] == "0":
break
y_max += 1
ans.append(2**y_max - 1)
print(*ans, sep="\n")