結果

問題 No.939 and or
ユーザー 双六
提出日時 2020-08-06 02:33:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 517 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 54,016 KB
最終ジャッジ日時 2024-09-18 22:30:36
合計ジャッジ時間 2,491 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	A, B = getlist()
	val = 0
	jud = 1
	for i in range(35):
		if A % 2 == 1 and B % 2 == 0:
			jud = 0
			break

		elif A % 2 == 0 and B % 2 == 1:
			val += 1

		A >>= 1; B >>= 1

	if jud == 0:
		print(0)
	else:
		ans = 2 ** (val - 1)
		print(ans)
	




if __name__ == '__main__':
	main()
0