欢迎来到起遇信息学
起遇信息学正处于上线筹建阶段,以下功能已全部开放免费体验: ✅ 完整题库浏览与代码提交评测(C / C++ / Python / Java 等) ✅ 入门到进阶的系列课程试读、作业与考试 ✅ AI 提示、AI 作业分析等智能助教功能 ✅ 赛事模拟与个人能力报告 ✅ 邮箱注册开放 ⏳ 付费课程订阅与微信/支付宝支付通道 ⏳ 手机号登录,微信扫码登录、微信公众号绑定 使用中如遇任何问题,欢迎通过页面底部 **"联系我们"** 与我们沟通。
CF1191A.Tokitsukaze and Enhancement
Tokitsukaze and Enhancement
Tokitsukaze is one of the characters in the game "Kantai Collection". In this game, every character has a common attribute — health points, shortened to HP.
In general, different values of HP are grouped into categories:
- Category if HP is in the form of , that is, when divided by , the remainder is ;
- Category if HP is in the form of , that is, when divided by , the remainder is ;
- Category if HP is in the form of , that is, when divided by , the remainder is ;
- Category if HP is in the form of , that is, when divided by , the remainder is .
The above-mentioned can be any integer.
These categories ordered from highest to lowest as , which means category is the highest and category is the lowest.
While playing the game, players can increase the HP of the character. Now, Tokitsukaze wants you to increase her HP by at most (that is, either by , or ). How much should she increase her HP so that it has the highest possible category?
Input
The only line contains a single integer () — the value Tokitsukaze's HP currently.
Output
Print an integer () and an uppercase letter (), representing that the best way is to increase her HP by , and then the category becomes .
Note that the output characters are case-sensitive.
Note
For the first example, the category of Tokitsukaze's HP is already , so you don't need to enhance her ability.
For the second example:
- If you don't increase her HP, its value is still , which equals to , and its category is .
- If you increase her HP by , its value becomes , which equals to , and its category becomes .
- If you increase her HP by , its value becomes , which equals to , and its category becomes .
Therefore, the best way is to increase her HP by so that the category of her HP becomes .
Samples
33
0 A
98
1 B
在线编程 IDE
建议全屏模式获得最佳体验
| 进入全屏编程 | Alt+E |
| 递交评测 | Ctrl+Enter |
| 注释/取消注释 | Ctrl+/ |
| 缩放字体 | Ctrl+滚轮 |