結果

問題 No.939 and or
ユーザー rlangevin
提出日時 2023-01-17 21:13:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 82,748 KB
実行使用メモリ 53,692 KB
最終ジャッジ日時 2025-01-03 00:07:00
合計ジャッジ時間 2,561 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = map(int, input().split())
x, y = 0, 0
for i in range(60):
    a = (A >> i)&1
    b = (B >> i)&1
    if a == 1 and b == 0:
        x += 1
    if a == 0 and b == 1:
        y += 1
if x:
    print(0)
elif y:
    print(2 ** (y - 1))
else:
    print(1)
0