Problem list
Log in
#r02774 · Online Judge > GoldOJ

Number Game

Bronze II 2.0 s 1024 MB

Players A and B start with values $a$ and $b$. A goes first, then they alternate; on your turn you add the opponent's value to your own. If after adding your value becomes $\ge c$, you lose. Print the winner (A or B).

Input

Three integers $a$, $b$, $c$ ($1 \le a, b < c \le 10^5$).

Output

Print A if A wins, B if B wins.

Example 1

Input
1 2 10
Output
A
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