#include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int n; string s,pomoc; cin>>n; cin>>s; pomoc = s; reverse(s.begin(),s.end()); if(pomoc == s) cout<<"TAK"<<endl; else cout<<"NIE"<<endl; return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int n; string s,pomoc; cin>>n; cin>>s; pomoc = s; reverse(s.begin(),s.end()); if(pomoc == s) cout<<"TAK"<<endl; else cout<<"NIE"<<endl; return 0; } |