ACM-ICPC 2018 焦作赛区网络预赛 A. Magic Mirror

#题解
题目大意 忽略大小写判断字符串是否出现过

直接将字符串转换为全小写判断
#AC代码

#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

const int INF = 0x3f3f3f3f;

int main()
{
#ifdef LOCAL
	freopen("C:/input.txt", "r", stdin);
#endif
	int T;
	cin >> T;
	while (T--)
	{
		string str;
		cin >> str;
		for (int i = 0; i < str.size(); i++)
			str[i] = tolower(str[i]);
		if (str == "jessie")
			cout << "Good guy!" << endl;
		else
			cout << "Dare you say that again?" << endl;
	}

	return 0;
}

猜你喜欢

转载自blog.csdn.net/CaprYang/article/details/82715658