欢迎来到起遇信息学
起遇信息学正处于上线筹建阶段,以下功能已全部开放免费体验: ✅ 完整题库浏览与代码提交评测(C / C++ / Python / Java 等) ✅ 入门到进阶的系列课程试读、作业与考试 ✅ AI 提示、AI 作业分析等智能助教功能 ✅ 赛事模拟与个人能力报告 ✅ 邮箱注册开放 ⏳ 付费课程订阅与微信/支付宝支付通道 ⏳ 手机号登录,微信扫码登录、微信公众号绑定 使用中如遇任何问题,欢迎通过页面底部 **"联系我们"** 与我们沟通。
CF1719A.Chip Game
Chip Game
Burenka and Tonya are playing an old Buryat game with a chip on a board of cells.
At the beginning of the game, the chip is located in the lower left corner of the board. In one move, the player can move the chip to the right or up by any odd number of cells (but you cannot move the chip both to the right and up in one move). The one who cannot make a move loses.
Burenka makes the first move, the players take turns. Burenka really wants to win the game, but she is too lazy to come up with a strategy, so you are invited to solve the difficult task of finding it. Name the winner of the game (it is believed that Burenka and Tonya are masters of playing with chips, so they always move in the optimal way).
Chip's starting cell is green, the only cell from which chip can't move is red. if the chip is in the yellow cell, then blue cells are all options to move the chip in one move.
Input
The first line contains one integer () — the number of test cases. The following is a description of the input data sets.
The only line of each test case contains two integers and () — the dimensions of the game board.
Output
For each test case print a single line — the name of the winner of the game ("Burenka" or "Tonya").
Note
In the first case, Burenka has no move, so Tonya wins.
In the second case, Burenka can move cells to the right, after which Tony will not be able to make a move, which means that Burenka wins.
In the third case, Burenka can move squares to the right. Then we can say that we have a game on a board of cells, and Tonya is the first player. In such game the second player wins, so in the original one Burenka will win.
Samples
6
1 1
1 4
5 6
2 2
6 3
999999999 1000000000
Tonya
Burenka
Burenka
Tonya
Burenka
Burenka
在线编程 IDE
建议全屏模式获得最佳体验
| 进入全屏编程 | Alt+E |
| 递交评测 | Ctrl+Enter |
| 注释/取消注释 | Ctrl+/ |
| 缩放字体 | Ctrl+滚轮 |