经典简约
清爽简洁,回归本真
液态水晶
毛玻璃+霓虹光带
赛博朋克
霓虹故障艺术风
🚫
违规操作检测
禁止使用右键菜单
⚠️ 此操作已被系统记录
1

Problem D: Numbersrebmun

📝 题解 🔵 仅限 C++
题目描述
<p></p> <h2>Problem D: Numbersrebmun</h2> <p><img align="right" src="http://tk.hustoj.com/admin/../upload/pimg28252_1.png" alt="" /> Anna and Bob are starting up a new high-tech company. Of course, one of their key considerations is choosing a good name for the company. Palindromes are cool. (A palindrome is a word that is the same when reversed, like the names of our two entrepreneurs.) They would really the name of their company to be a palindrome. Unfortunately, they cannot think of a nifty company name that is also a palindrome.</p> <p>Maybe at least the telephone number of their company could be a palindrome. However, they really want their customers to be able to call them, so they want to choose the company name so that, when it is typed using the letters printed on a phone keypad, the result is also their phone number. (On a standard phone keypad, the following keys contain the corresponding letters: 2: ABC, 3: DEF, 4: GHI, 5: JKL, 6: MNO, 7: PQRS, 8: TUV, 9: WXYZ.)</p> <p></p>
输入格式
<p>The first line of input contains a single integer, the number of lines to follow. Each following line contains a company name, which is a string of at most 20 letters, which may be either uppercase or lowercase.</p>
输出格式
<p>For each company name, print a single line of output, containing the word YES if the phone number is a palindrome, or NO if it is not.</p>
样例
样例输入 1
2 ANBOBNA iAmACoolCompany
样例输出 1
YES NO
提交代码
请先登录后提交

🤖 AI 解题助手

OpenRouter
就绪
👋 你好!我是 AI 解题助手。
我已阅读了这道题,可以帮你分析思路、提供代码示例。
🔓 完全免费 · 无需消耗 Token