fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string a,b;
  6. cin>>a;
  7. for(int i=a.length()-1;i>=0;i--)
  8. {
  9. b=b+a[i];
  10. }
  11. if(a==b)
  12. {
  13. cout<<"TAK";
  14. }
  15. else
  16. {
  17. cout<<"NIE";
  18. }
  19. }
Success #stdin #stdout 0s 15232KB
stdin
KAJAKA
stdout
NIE