Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - using System;
- using System.Linq;
- class C
- {
- static void Main()
- {
- string i = Console.ReadLine();
- int k = i.Distinct().Count();
- if (k != 1)
- {
- int x = 0;
- int o = i.Select(c => i.Remove(x++, 1)).Any(s => s.Reverse().SequenceEqual(s)) ? x : 0;
- Console.WriteLine(x - 1);
- }
- else
- {
- Console.WriteLine(-1);
- }
- }
- }
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment                    
                 
                    