結果

問題 No.939 and or
ユーザー GrayCoder
提出日時 2019-12-07 02:13:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-12-24 06:25:18
合計ジャッジ時間 2,248 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 5 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B = map(int, input().split())

    if A & B != A:
        print(0)
        return

    a, i, zero = A, 0, 0
    while a > 0:
        if not A & 1 << i:
            zero += 1
        a //= 2
        i += 1
    print(2 ** (zero - 1))


main()
0