問題一覧 > 通常問題

No.1511 A ? B Problem

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 358
作問者 : だれ / テスター : ぷら
お気に入りにしたユーザー ProblemId : 6465 / 自分の提出
問題文最終更新日: 2026-04-28 14:19:34
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 296 (順位表) の他の問題:

Problem Statement

You are given positive integers $A, B$. Find $(A\ |\ B)-(A\ \&\ B)$.

Here, $|$ denotes bitwise OR and $\&$ denotes bitwise AND.

Input

$A\ B$

  • $1\leq A,B\leq 1000$
  • All inputs are integers.

Output

Output the answer, followed by a newline.

Sample

Sample 1
Input
1 1
Output
0

We have $1\ |\ 1=1,\ 1\ \&\ 1=1$.

Sample 2
Input
3 5
Output
6

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。