結果

問題 No.939 and or
ユーザー 👑 tamatotamato
提出日時 2019-12-02 00:16:46
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 1,042 ms
コンパイル使用メモリ 86,740 KB
実行使用メモリ 71,176 KB
最終ジャッジ日時 2023-08-14 05:27:01
合計ジャッジ時間 4,909 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
70,720 KB
testcase_01 AC 70 ms
71,020 KB
testcase_02 AC 72 ms
70,892 KB
testcase_03 AC 75 ms
70,568 KB
testcase_04 AC 72 ms
70,564 KB
testcase_05 AC 73 ms
71,020 KB
testcase_06 AC 75 ms
71,176 KB
testcase_07 AC 75 ms
71,012 KB
testcase_08 AC 71 ms
70,960 KB
testcase_09 AC 71 ms
71,076 KB
testcase_10 AC 73 ms
70,568 KB
testcase_11 AC 74 ms
71,140 KB
testcase_12 AC 72 ms
70,996 KB
testcase_13 AC 74 ms
70,816 KB
testcase_14 AC 71 ms
70,544 KB
testcase_15 AC 72 ms
70,756 KB
testcase_16 AC 73 ms
70,892 KB
testcase_17 AC 72 ms
70,996 KB
testcase_18 AC 72 ms
70,984 KB
testcase_19 AC 73 ms
70,832 KB
testcase_20 AC 69 ms
71,076 KB
testcase_21 AC 71 ms
70,816 KB
testcase_22 AC 70 ms
70,796 KB
testcase_23 AC 73 ms
70,892 KB
testcase_24 AC 72 ms
71,140 KB
testcase_25 AC 72 ms
70,996 KB
testcase_26 AC 72 ms
70,820 KB
testcase_27 AC 72 ms
70,816 KB
testcase_28 AC 70 ms
70,812 KB
testcase_29 AC 71 ms
70,796 KB
testcase_30 AC 71 ms
70,880 KB
testcase_31 AC 73 ms
70,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a_raw, b_raw = map(int, input().split())

a = bin(a_raw)[2:]
b = bin(b_raw)[2:]
L = max(len(a), len(b))
a = a.zfill(L)
b = b.zfill(L)

ans = 1
for i in range(L):
    if a[i] == '0' and b[i] == '1':
        ans *= 2
    elif a[i] == '1' and b[i] == '0':
        print(0)
        exit()

if ans == 1:
    print(1)
else:
    print(ans // 2)
0