Jakiś pomysł dlaczego sędzia nie akceptuje?
http://pl.spoj.com/problems/JSZYCER/
#include <iostream>
#include <string>
using namespace std;
int main()
{
string tekst;
getline(cin, tekst);
for(int i=0; i<=tekst.length()-1; i++)
{
if(tekst[i] == 'Z') { tekst[i] = 'C'; }
else if(tekst[i] == 'Y') { tekst[i] = 'B'; }
else if(tekst[i] == 'X') { tekst[i] = 'A'; }
else if(tekst[i] == 32 ) { tekst[i] = 32; }
else {tekst[i] += 3;}
}
cout << tekst << endl;
return 0;
}