結果

問題 No.939 and or
ユーザー 👑 rin204
提出日時 2022-01-18 23:41:02
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 177 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-11-23 13:37:23
合計ジャッジ時間 2,524 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

a, b = map(int, input().split())
if a | b != b:
    print(0)
    exit()
elif a == b:
    print(1)
    exit()
x = a ^ b
cnt = bin(x).count("1")
print(pow(2, cnt - 1))
0