Problem list
Log in
#r03317 · Online Judge > GoldOJ

Logical Operations

Bronze IV 2.0 s 256 MB

Given two integers $A$ and $B$, treat $0$ as false and any non-zero value as true. Print A AND B, A OR B, and NOT A in this order, one per line ($1$ for true, $0$ for false).

Input

Two integers $A$ and $B$ ($-100 \le A, B \le 100$).

Output

Print three lines of $1$/$0$.

Example 1

Input
5 0
Output
0
1
0

Example 2

Input
0 0
Output
0
0
1
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code