当前位置:网站首页>A. YES or YES?
A. YES or YES?
2022-07-27 04:00:00 【Felven】
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
There is a string ss of length 33, consisting of uppercase and lowercase English letters. Check if it is equal to "YES" (without quotes), where each letter can be in any case. For example, "yES", "Yes", "yes" are all allowable.
Input
The first line of the input contains an integer tt (1≤t≤1031≤t≤103) — the number of testcases.
The description of each test consists of one line containing one string ss consisting of three characters. Each character of ss is either an uppercase or lowercase English letter.
Output
For each test case, output "YES" (without quotes) if ss satisfies the condition, and "NO" (without quotes) otherwise.
You can output "YES" and "NO" in any case (for example, strings "yES", "yes" and "Yes" will be recognized as a positive response).
Example
input
Copy
10 YES yES yes Yes YeS Noo orZ yEz Yas XES
output
Copy
YES YES YES YES YES NO NO NO NO NO
Note
The first five test cases contain the strings "YES", "yES", "yes", "Yes", "YeS". All of these are equal to "YES", where each character is either uppercase or lowercase.
Problem solving instructions : Water problem , Just judge directly .
#include<stdio.h>
int main()
{
int t;
scanf("%d", &t);
while (t--)
{
char str[5];
scanf("%s", str);
if ((str[0] == 'Y' || str[0] == 'y') && (str[1] == 'E' || str[1] == 'e') && (str[2] == 'S' || str[2] == 's'))
{
printf("YES\n");
}
else
{
printf("NO\n");
}
}
return 0;
}
边栏推荐
- Kettle reads file split by line
- Redis(九) - Redis之分布式锁
- Vector to SVG method
- URDF_ Xcaro
- B. ICPC Balloons
- 九方智投是正规公司吗?一起聊聊九方智投
- Maximum subarray cumulative sum less than or equal to K
- 面试题:String类中三种实例化对象的区别
- Permutation and binary (Ji, DA) (day 84)
- Interview question: the difference between three instantiated objects in string class
猜你喜欢

Is Jiufang intelligent investment a regular company? Talk about Jiufang intelligent investment

flask_ Reqparse parser inheritance in restful
![[tree chain dissection] 2022 Hangzhou Electric Multi school 21001 static query on tree](/img/b3/58c053d082807a0e5639e5b968aa20.png)
[tree chain dissection] 2022 Hangzhou Electric Multi school 21001 static query on tree

Briefly sort out the dualpivotquicksort

阿里云服务器域名加端口网页不能访问问题记录

The new version of Alibaba Seata finally solves the idempotence, suspension and empty rollback problems of TCC mode

Framework学习之旅:init 进程启动过程

477-82(236、61、47、74、240、93)

SkyWalking分布式系统应用程序性能监控工具-中

FastBoot brush machine
随机推荐
04. Detailed steps for installing the simulated browser chromedriver in Google browser
Program to change the priority of the process in LabVIEW
There is no problem reading from flick CDC to mysql8 and mysql5. What should I do?
Use websocket to realize a web version of chat room (fishing is more hidden)
[tree chain dissection] 2022 Hangzhou Electric Multi school 21001 static query on tree
Plato farm is expected to further expand its ecosystem through elephant swap
Framework学习之旅:init 进程启动过程
Smart pointer shared_ ptr、unique_ ptr、weak_ ptr
If the detailed explanation is generated according to the frame code
Cocos game practice-05-npc and character attack logic
Threads and processes
Do you really understand code rollback?
On the first day of Shenzhen furniture exhibition, the three highlights of Jin Ke'er booth were unlocked!
电商系统结合商品秒杀活动,VR全景不断带来收益
connman介绍
Two help points distribution brings to merchants
04.在谷歌浏览器中安装模拟浏览器ChromeDriver的详细步骤
Permutation and binary (Ji, DA) (day 84)
Solution to Chinese garbled code in console header after idea connects to database to query data
C. Cypher