結果

問題 No.939 and or
ユーザー 12354865271235486527
提出日時 2019-12-21 10:32:43
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 170 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 10,468 KB
実行使用メモリ 7,880 KB
最終ジャッジ日時 2023-09-26 07:26:40
合計ジャッジ時間 2,673 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,880 KB
testcase_01 AC 16 ms
7,788 KB
testcase_02 AC 15 ms
7,816 KB
testcase_03 AC 16 ms
7,824 KB
testcase_04 AC 16 ms
7,732 KB
testcase_05 WA -
testcase_06 AC 16 ms
7,728 KB
testcase_07 AC 16 ms
7,776 KB
testcase_08 AC 16 ms
7,840 KB
testcase_09 AC 20 ms
7,728 KB
testcase_10 AC 16 ms
7,812 KB
testcase_11 AC 15 ms
7,768 KB
testcase_12 AC 15 ms
7,732 KB
testcase_13 WA -
testcase_14 AC 16 ms
7,840 KB
testcase_15 AC 15 ms
7,824 KB
testcase_16 AC 15 ms
7,828 KB
testcase_17 AC 16 ms
7,776 KB
testcase_18 AC 14 ms
7,772 KB
testcase_19 AC 15 ms
7,876 KB
testcase_20 WA -
testcase_21 AC 14 ms
7,824 KB
testcase_22 AC 14 ms
7,704 KB
testcase_23 AC 15 ms
7,876 KB
testcase_24 AC 15 ms
7,740 KB
testcase_25 AC 15 ms
7,744 KB
testcase_26 AC 15 ms
7,824 KB
testcase_27 AC 15 ms
7,680 KB
testcase_28 AC 15 ms
7,876 KB
testcase_29 WA -
testcase_30 AC 15 ms
7,760 KB
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def num_of_bits(bits):
    return bin(bits).count('1')

N, M = map(int, input().split())
if N & M != N:
    print(0)
else:
    a = num_of_bits(N ^ M)
    print(2**(a-1))
0