当前位置:网站首页>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;
}
边栏推荐
- Process analysis of object creation
- Typescript TS basic knowledge interface, generics
- Specific use of multithreading
- If the detailed explanation is generated according to the frame code
- Cocos game practice-04-collision detection and NPC rendering
- [Android synopsis] kotlin multithreaded programming (I)
- About the solution of using hyperbeach to appear /bin/sh: 1: packr2: not found
- mysql中case when返回多个字段处理方案
- 明汯投资裘慧明:长期优异超额的背后考验的是团队的投研能力和策略的完整性
- ZJCTF_ login
猜你喜欢

路由策略第一关

【愚公系列】2022年7月 Go教学课程 018-分支结构之switch

Record the problem of PHP program accessing system files incorrectly

关于使用hyperbeach出现/bin/sh: 1: packr2: not found的解决方案

Specific use of multithreading

手动从0搭建ABP框架-ABP官方完整解决方案和手动搭建简化解决方案实践

The function and application of lpci-252 universal PCI interface can card

Do you really understand code rollback?

Chapter 4 decision tree and random forest

Briefly sort out the dualpivotquicksort
随机推荐
Ring counting (Northern Polytechnic machine test questions) (day 83)
Maximum subarray cumulative sum less than or equal to K
Worthington papain dissociation system solution
A. YES or YES?
Do you really understand code rollback?
使用redis c库,异步内存泄露的问题
"Date: write error: no space left on device" solution
[Android synopsis] kotlin multithreaded programming (I)
A. Parkway Walk
Cocos game practice-05-npc and character attack logic
Csu18m91 is used as the master controller of the intelligent scale scheme
酷雷曼VR全景为你铺设创业之路
The new version of Alibaba Seata finally solves the idempotence, suspension and empty rollback problems of TCC mode
URDF_Xcaro
Design method and test method of APP interface use case
If the detailed explanation is generated according to the frame code
这个FlinkCDC会监控数据库中所有的表?还是指定的表呢?我看后台日志,他是监控了所有表,如果监控
Director of meta quest content ecology talks about the original intention of APP lab design
Okaleido tiger is about to log in to binance NFT in the second round, which has aroused heated discussion in the community
Feitengtengrui d2000 won the "top ten hard core technologies" award of Digital China