-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathASCII_Art.cs
More file actions
43 lines (34 loc) · 1.01 KB
/
ASCII_Art.cs
File metadata and controls
43 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
int L = int.Parse(Console.ReadLine());
int H = int.Parse(Console.ReadLine());
string T = Console.ReadLine();
const int A = (int)'A';
const int Z = (int)'Z';
string str = T.ToUpper();
for (int i = 0; i < H; i++)
{
string row = Console.ReadLine();
string ret = "";
foreach (var s in str)
{
var c = (int)s;
if (c < A || c > Z)
ret += row.Substring(L * (Z - A + 1), L);
else
ret += row.Substring(L * (c - A), L);
}
Console.WriteLine(ret);
}
}
}
}