結果

問題 No.939 and or
コンテスト
ユーザー tnodino
提出日時 2022-08-10 20:59:57
言語 Python3
(3.14.2 + numpy 2.4.0 + scipy 1.16.3)
結果
WA  
実行時間 -
コード長 361 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 125 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-21 07:13:45
合計ジャッジ時間 1,832 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

A,B = map(int,input().split())
bit1 = [0] * 32
bit2 = [0] * 32
for i in range(32):
    if A & (1 << i):
        bit1[i] = 1
for i in range(32):
    if B & (1 << i):
        bit2[i] = 1
cnt = 0
for i in range(32):
    if bit1[i] == 1 and bit2[i] == 0:
        print(0)
        exit()
    if bit1[i] == 0 and bit2[i] == 1:
        cnt += 1
print(pow(2, cnt) // 2)
0