結果

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

ソースコード

diff #

# 2020/01/02

a,b=map(int,input().split())
bit=bin(a&b).count('0')-1
n=max(len(bin(a))-2,len(bin(b))-2)
aa=bin(a)[2:].zfill(n)
bb=bin(b)[2:].zfill(n)
for ax,bx in zip(aa,bb):
    if int(ax) and not int(bx):
        print(0)
        exit()
print(pow(2,bit-1))
0