結果
問題 |
No.2393 Bit Grid Connected Component
|
ユーザー |
![]() |
提出日時 | 2023-07-30 15:12:41 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 405 ms / 2,000 ms |
コード長 | 240 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 82,580 KB |
実行使用メモリ | 76,672 KB |
最終ジャッジ日時 | 2024-10-09 10:26:23 |
合計ジャッジ時間 | 3,971 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 20 |
ソースコード
T = int(input()) for _ in range(T): x, y = map(int, input().split()) B = [] while x > 0: B.append(x % 2) x //= 2 NB = len(B) ans = 0 while y < NB and B[y] == 1: y += 1 print((1 << y) - 1)