250
No testdata at current.
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
小A 和 小B 在玩一个叫做《250》的游戏。
Description
游戏规则是这样的:
首先 小A 和 小B 会各自说一个 2
5
0
中的数字,其中 5
能赢 2
,2
能赢 0
,0
能赢 5
。
他们一共会比 局,并且 小A 和 小B 都有一个出数周期。
小A 的出数周期的长度为 ,小B 的出数周期的长度为 。
现在告诉你他们的出数周期,请你统计 局当中谁赢得次数多。
Format
Input
第1行为3个整数 。
第2行为 个整数 ,表示 小A 的出数周期。
第3行为 个整数 ,表示 小B 的出数周期。
Output
如果 小A 赢,输出 A
。
如果 小B 赢,输出 B
。
如果两人平局,输出 AB
。
Samples
10 3 4
0 2 5
0 5 0 2
A
Limitation
非常“简单”
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 17
- Start at
- 2025-1-24 17:00
- End at
- 1970-1-1 8:00
- Duration
- -482697 hour(s)
- Host
- Partic.
- 1