結果

問題 No.939 and or
ユーザー 👑 H20H20
提出日時 2020-11-26 09:02:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 303 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 71,632 KB
最終ジャッジ日時 2023-10-01 03:15:04
合計ジャッジ時間 3,613 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,464 KB
testcase_01 AC 66 ms
71,608 KB
testcase_02 WA -
testcase_03 AC 64 ms
71,580 KB
testcase_04 WA -
testcase_05 AC 65 ms
71,264 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 71 ms
71,388 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 66 ms
71,296 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 67 ms
71,288 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 67 ms
71,592 KB
testcase_21 WA -
testcase_22 AC 69 ms
71,312 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 67 ms
71,312 KB
testcase_30 AC 65 ms
71,564 KB
testcase_31 AC 66 ms
71,312 KB
権限があれば一括ダウンロードができます

ソースコード

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(max(1,ans))
0