結果

問題 No.2393 Bit Grid Connected Component
ユーザー hiro1729
提出日時 2023-07-21 16:49:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 1,722 ms / 2,000 ms
コード長 173 bytes
コンパイル時間 165 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-09-21 18:41:19
合計ジャッジ時間 7,202 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
	x, y = map(int, input().split())
	t = ((x + (1 << y)) >> y) << y
	for i in range(62):
		if t & (1 << i):
			print((1 << i) - 1)
			break
0