1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include<iostream>
using namespace std;
int main()
{
long long i=0, j=0;
string s;
cin>>s;
j=s.size()-1;
while(i < j)
{
if (s[i] != s[j])
{
break;
}
i++;
j--;
}
if (i < j)
cout << "NIE" << endl;
else
cout << "TAK" << endl;
return 0;
}
|