竞赛
考级
一坨江
zsy
本题较为简单,只做了2个测试点,根本无需使用字符串,重复输入字符即可。
毛奕程
#include<bits/stdc++.h> using namespace std; int main(){ char s[10086]; cin>>s; int n = strlen(s); for(int i=0;i<n;i++){ if(s[i]'e')s[i]='t'; else if(s[i]'h')s[i]='Q'; } cout<<s; return 0; }
???
#include<bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; for(int i = 0; i < s.size(); i++){ if(s[i] == 'e'){ cout << "t"; }else if(s[i] == 'h'){ cout << "Q"; }else{ cout << s[i]; } } return 0; }
我不是AC君
提交答案之后,这里将显示提交结果~