結果

問題 No.939 and or
ユーザー 学ぶマン
提出日時 2025-02-26 19:19:06
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 82,472 KB
実行使用メモリ 53,784 KB
最終ジャッジ日時 2025-02-26 19:19:10
合計ジャッジ時間 3,042 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

A, B = map(int, input().split())

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

if A == B:
    exit(print(1))

cnt = B.bit_count() - A.bit_count()
ans = 2**(cnt - 1)
print(ans)
0