emmmmmm昨天读一个超级超级水的题都用坑的啊 好蠢好蠢好蠢
“H” prints “Hello, World!”,
“Q” prints the source code of the program itself,
“9” prints the lyrics of “99 Bottles of Beer” song,
“+” increments the value stored in the internal accumulatorOutput “YES”, if executing the program will produce any output, and “NO” otherwise.
啊呐 注意注意
要求的呢是output
不能把+号也放进去的啊
WAWAWA::::::::
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s;
cin>>s;
for (int i=0;i<s.size();i++){
if(s[i]=='H'||s[i]=='Q'||s[i]=='9'||s[i]=='+'){
cout<<"YES"<<endl;
return 0;
}
cout<<"NO"<<endl;
return 0;
}
}
//ACACAC
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string s;
cin>>s;
for (int i=0;i<s.size();i++){
if(s[i]=='H'||s[i]=='Q'||s[i]=='9'){
cout<<"YES"<<endl;
return 0;
}
cout<<"NO"<<endl;
return 0;
}
}