题解 CF133A 【HQ9+】

题意很简单。输入字符串后,判断有没有$H , Q ,9$ 这三种字符就行

#include<iostream>
using namespace std;
string a;
int main()
{
    cin>>a;
    for(int i=0;i<a.length() ;i++)
        if(a[i]=='H'||a[i]=='Q'||a[i]=='9')
        {
            cout<<"YES"<<endl;
            return 0;
        }
    cout<<"NO"<<endl;
    return 0;
 } 

猜你喜欢

转载自www.cnblogs.com/lizinuo/p/10543868.html
HQ
今日推荐