AtCoder Beginner Contest 071
翻译中…
Problem Statement
翻译中…
Snuke lives at position $x$ on a number line. On this line, there are two stores $A$ and $B$, respectively at position $a$ and $b$, that offer food for delivery.
翻译中…
Snuke decided to get food delivery from the closer of stores $A$ and $B$. Find out which store is closer to Snuke's residence.
翻译中…
Here, the distance between two points $s$ and $t$ on a number line is represented by $|s-t|$.
翻译中…
Constraints
翻译中…
$1 \leq x \leq 1000$$1 \leq a \leq 1000$$1 \leq b \leq 1000$$x, a$and$b$are pairwise distinct.- The distances between Snuke's residence and stores
$A$and$B$are different.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
x a b
翻译中…
Output
翻译中…
If store $A$ is closer, print A; if store $B$ is closer, print B.
翻译中…
样例
Input #1
5 2 7
Output #1
B
The distances between Snuke's residence and stores $A$ and $B$ are $3$ and $2$, respectively. Since store $B$ is closer, print `B`.
Input #2
1 999 1000
Output #2
A
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。