結果
| 問題 | No.2393 Bit Grid Connected Component |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-25 07:14:23 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 99 ms / 2,000 ms |
| + 172µs | |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 80,512 KB |
| 実行使用メモリ | 84,564 KB |
| 最終ジャッジ日時 | 2026-10-06 16:02:56 |
| 合計ジャッジ時間 | 4,183 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 20 |
ソースコード
from collections import *
from itertools import *
from functools import *
from heapq import *
import sys,math
input = sys.stdin.readline
def answer():
x,y = map(int,input().split())
for i in range(y,61):
if (x>>i)&1:
continue
else:
break
if i==y:
print(0)
return
print(pow(2,i)-1)
for _ in range(int(input())):
answer()