Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Main(string[] args)
- {
- int L = int.Parse(Console.ReadLine());
- int H = int.Parse(Console.ReadLine());
- string T = Console.ReadLine().ToUpper();
- string abc="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- for (int i = 0; i < H; i++)
- {
- string ROW = Console.ReadLine();
- string output="";
- for (int k=0; k< T.Length; k++)
- {
- int charPosition=abc.IndexOf(T[k]);
- if (charPosition !=-1)
- {
- int start = L*charPosition;
- int end = start + L;
- for (int j=start; j<end; j++)
- {
- output+=ROW[j];
- }
- }
- else
- {
- for (int j=ROW.Length-L; j<ROW.Length; j++)
- {
- output+=ROW[j];
- }
- }
- }
- Console.WriteLine(output);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement