Mam problem z tym zadaniem KC009. W konsoli wyraz dobrze się odwraca, lecz sędzia nie chce mi go przyjąć. Nie wiem co mam zrobić. To jest mój kod:
include
using namespace std;
string napis,napis2,odw,terlit;
int dl,terdl,pom;
int main()
{
getline(cin,napis);
dl = napis.length();
terdl = dl;
napis2 = napis;
for(int i=dl; i>=1; i--)
{
napis = napis2;
terlit = napis.erase(0,terdl-1);
terlit = napis.erase(1,pom);
odw += terlit;
terdl--;
pom++;
}
cout << odw << endl;
odw = "";
pom = 0;
return 0;
}