結果
問題 | No.2393 Bit Grid Connected Component |
ユーザー |
|
提出日時 | 2023-07-29 00:30:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,092 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 145 ms |
コンパイル使用メモリ | 82,236 KB |
実行使用メモリ | 87,344 KB |
最終ジャッジ日時 | 2024-10-06 23:35:50 |
合計ジャッジ時間 | 4,709 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 20 |
ソースコード
T = int(input())ans = []for _ in range(T):x, y = list(map(int, input().split()))y_max = ywhile True:x_bin = format(x, 'b')[::-1]if y_max > len(x_bin)-1 or x_bin[y_max] == "0":breaky_max += 1ans.append(2**y_max - 1)print(*ans, sep="\n")