static void Main(string[] args) { var n = ReadInt(); var s = Read(); var ans = ""; for (int i = 0; i < s.Length; i++) { var x = ABC.BinarySearch(s[i]); ans += ABC[(x + n) % 26]; } WriteLine(ans); }
static void Main(string[] args) { var input = Console.In; var output = Console.Out; try { Console.SetIn(File.OpenText("Problem.txt")); var sw = new StringWriter(); Console.SetOut(sw); var stopwatch = new Stopwatch(); stopwatch.Start(); ABC.Solve(); stopwatch.Stop(); Debug.WriteLine(stopwatch.Elapsed); Debug.Write(sw.ToString()); } finally { Console.SetIn(input); Console.SetOut(output); } //Console.ReadKey(); }