結果

問題 No.939 and or
ユーザー ああいいああいい
提出日時 2021-12-07 18:31:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 420 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 8,260 KB
最終ジャッジ日時 2023-09-22 04:08:21
合計ジャッジ時間 2,082 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 15 ms
8,204 KB
testcase_02 WA -
testcase_03 AC 15 ms
8,020 KB
testcase_04 WA -
testcase_05 AC 14 ms
7,800 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 18 ms
8,260 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 15 ms
7,916 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 15 ms
8,084 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 15 ms
7,788 KB
testcase_21 WA -
testcase_22 AC 14 ms
8,152 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 15 ms
7,780 KB
testcase_30 AC 15 ms
8,136 KB
testcase_31 AC 15 ms
7,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
A,B = list(map(int,input().split()))

count = 0
for i in range(32):
    mask = 1 << i
    if A & mask and B & mask == 0:
        print(0)
        exit()
    if A & mask == 0 and B & mask == 1:
        count += 1
if A == B:
    print(1)
else:
    print(2 ** (count-1))
0