結果

問題 No.939 and or
ユーザー takakin
提出日時 2020-05-28 21:51:12
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 258 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-13 10:48:42
合計ジャッジ時間 2,082 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
a,b=map(int,input().split())
ct01,ct10=0,0
for i in range(31):
  aa,bb=a&(1<<i),b&(1<<i)
  if (not aa) and bb:
    ct01+=1
  if aa and (not bb):
    ct10+=1
if ct10:
  print(0)
else:
  print(2**(ct01-1))
0