Advertisement
rengetsu

Codeforces_133A

Jul 21st, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. //Codeforces 133A
  2. #include <string>
  3. #include <cstring>
  4. #include <iostream>
  5. using namespace std;
  6. int main()
  7. {
  8.     int len, answ=0;
  9.     string s;
  10.     char mass[101];
  11.     cin >> s;
  12.     len = s.size();
  13.     strcpy(mass, s.c_str());
  14.     for(int i=0;i<len;i++)
  15.     {
  16.         if(mass[i]=='H' || mass[i]=='Q' || mass[i]=='9')
  17.         {
  18.             answ=1;
  19.         }
  20.     }
  21.     if(answ==1){cout<<"YES";}
  22.     else{cout<<"NO";}
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement