No.1511 A ? B Problem
問題文最終更新日: 2026-04-28 14:19:34
English (AI translation)
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もしくは右上の雲マークをクリックしてアカウントを作成してください。
だれ
ぷら