当前位置:网站首页>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;
}
边栏推荐
- Director of meta quest content ecology talks about the original intention of APP lab design
- Day 27 of leetcode
- DataX cannot connect to the corresponding database (yes under windows, but failed under Linux)
- Okaleido tiger is about to log in to binance NFT in the second round, which has aroused heated discussion in the community
- A. Round Down the Price
- Chapter 4 决策树和随机森林
- 使用redis c库,异步内存泄露的问题
- Textbox in easyUI inserts content at the cursor position
- flinkSQLclient创建的job,flink重启就没了,有什么办法吗?
- 分享当下人生——一个高中毕业生在中央电视台的六星期实习经历
猜你喜欢

Maximum subarray cumulative sum less than or equal to K

Basic concept and essence of Architecture

About the solution of using hyperbeach to appear /bin/sh: 1: packr2: not found

Characteristics and determination scheme of Worthington pectinase

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

The fifth strong network cup national network security challenge Title reappearance (with title attachment, detailed explanation)

VR全景制作在家装行业是谈单利器?这是为什么呢?

C. Cypher

Kettle reads file split by line

Kettle读取按行分割的文件
随机推荐
一维数组的应用
代码回滚,你真的理解吗?
Leetcode- > dichotomy (III)
Source code analysis of openfeign
GetObject call timing of factorybean
Cocos game practice-05-npc and character attack logic
If the detailed explanation is generated according to the frame code
Redis source code learning (33), command execution process
Data analysis and disassembly method of banyan tree in Bairong
Chapter 5 decision tree and random forest practice
FastBoot brush machine
unity之二维数组实现正六边形地图
04. Detailed steps for installing the simulated browser chromedriver in Google browser
Threads and processes
Chapter 5 决策树和随机森林实践
Bean Validation原理篇--07
真正意义上的数字零售应当具有更加丰富的内涵和意义
Solution to Chinese garbled code in console header after idea connects to database to query data
Minimum ticket price (day 80)
Maximum continuous subsequence (day 77)