結果

問題 No.939 and or
ユーザー H20
提出日時 2020-11-26 09:01:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 305 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 54,476 KB
最終ジャッジ日時 2024-07-23 20:42:52
合計ジャッジ時間 2,505 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 5 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

def muzyun(A,B):
    while A:
        if A & 1 == 1 and B & 1 !=1:
            return True
        A >>= 1
        B >>= 1
    return False

A, B = map(int,input().split())
if muzyun(A,B):
    print(0)
    exit()
ans = 0

C = A^B
while C:
    if C & 1 == 1:
        ans+=1
    C >>= 1

print(min(1,ans))

0