結果

問題 No.2393 Bit Grid Connected Component
ユーザー nikoro256nikoro256
提出日時 2023-07-28 21:50:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 381 ms / 2,000 ms
コード長 287 bytes
コンパイル時間 1,418 ms
コンパイル使用メモリ 82,028 KB
実行使用メモリ 77,340 KB
最終ジャッジ日時 2024-10-06 18:26:27
合計ジャッジ時間 3,881 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
exp=[2**i for i in range(61)]
exp2=exp[::]
for i in range(1,61):
    exp2[i]+=exp2[i-1]
for _ in range(T):
    x,y=map(int,input().split())
    dat=[0 for _ in range(60)]
    for i in range(y+1,61):
        if x//exp[i]%2==0:
            break
    i-=1
    print(exp2[i]) 
0