結果

問題 No.2393 Bit Grid Connected Component
ユーザー ShirotsumeShirotsume
提出日時 2023-07-28 21:32:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 424 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 77,696 KB
最終ジャッジ日時 2024-04-16 05:22:50
合計ジャッジ時間 2,714 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
54,912 KB
testcase_01 AC 49 ms
55,040 KB
testcase_02 AC 50 ms
55,168 KB
testcase_03 AC 49 ms
55,040 KB
testcase_04 AC 49 ms
55,168 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 56 ms
61,824 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 169 ms
77,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, time, random
from collections import deque, Counter, defaultdict
input = lambda: sys.stdin.readline().rstrip()
ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(mi())
inf = 2 ** 63 - 1
mod = 998244353

t = ii()

for _ in range(t):
    x, y = mi()
    x |= (2 ** y - 1)
    ans = 0
    for bit in range(0, 60):
        if 1 & (x >> bit):
            ans += 1 << bit
    print(ans)
0