Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- char s[255];
- int main()
- {
- cin.get(s,255);
- int L=strlen(s),gata=1,n=0;
- while(gata)
- {
- if(L%2!=0)
- break;
- for(int i=0;i<L/2;++i)
- if(s[i]!=s[L-i-1])
- {
- gata=0;
- break;
- }
- else
- ++n,L/=2;
- }
- cout<<n;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement