結果
| 問題 | No.939 and or |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-07 02:33:28 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 406 bytes |
| 記録 | |
| コンパイル時間 | 364 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-12-24 06:29:00 |
| 合計ジャッジ時間 | 2,314 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 WA * 5 |
ソースコード
from sys import stdin
def main():
input = lambda: stdin.readline()[:-1]
A, B = map(int, input().split())
if A & B != A:
print(0)
return
i, n = 0, 0
max_ = max(A, B)
while max_ > 0:
ai = A & 1 << i
bi = B & 1 << i
if (not ai and bi) or (ai and not bi):
n += 1
max_ //= 2
i += 1
print(2 ** (n - 1))
main()