泪流满面啊,终于AC了,坑死了!
#include<iostream>
#include<string>
using namespace std;
int main(){
string s;
while(getline(cin,s)){
for(int i=0;i<s.length();i++){
if(s[i]=='A'||s[i]=='W'||s[i]=='F')
cout<<"I";
//else if(s[i]==' ')
//cout<<endl;
else if(s[i]=='C')
cout<<"L";
else if(s[i]=='M')
cout<<"o";
else if(s[i]=='S')
cout<<"v";
else if(s[i]=='D'||s[i]=='P'||s[i]=='G'||s[i]=='B')
cout<<"e";
else if(s[i]=='L')
cout<<"Y";
else if(s[i]=='X')
cout<<"u";
else if(s[i]=='E'&&s[i+1]=='N'&&s[i+2]=='D')
return 0;
else
cout<<s[i];
}
cout<<endl;
continue;
}
return 0;
}
原来只要把
break;改为return 0;(这一点值得注意!!!)
就会从WA变为
Presentation Error 了,
把//else if(s[i]==' ')//cout<<endl;注释掉就能AC了!!!!!!!!!