Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Codeforces 133A
- #include <string>
- #include <cstring>
- #include <iostream>
- using namespace std;
- int main()
- {
- int len, answ=0;
- string s;
- char mass[101];
- cin >> s;
- len = s.size();
- strcpy(mass, s.c_str());
- for(int i=0;i<len;i++)
- {
- if(mass[i]=='H' || mass[i]=='Q' || mass[i]=='9')
- {
- answ=1;
- }
- }
- if(answ==1){cout<<"YES";}
- else{cout<<"NO";}
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement