Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
- class Program
- {
- static void Main()
- {
- Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
- int n = int.Parse(Console.ReadLine());
- int k = int.Parse(Console.ReadLine());
- int width = 2*n + 1;
- for (int i = 0; i < n; i++)
- {
- Console.Write(new string('#', i));
- Console.Write("\\");
- if (width > 2 * i + 2 * k + 4)
- {
- Console.Write(new string(' ', k));
- Console.Write("\\");
- Console.Write(new string('.', width - 2*k - 4 - 2*i));
- Console.Write("/");
- Console.Write(new string(' ', k));
- }
- else
- {
- Console.Write(new string(' ', width - 2 - 2*i));
- }
- Console.Write("/");
- Console.WriteLine(new string('#', i));
- }
- Console.Write(new string('#', n));
- Console.Write("X");
- Console.WriteLine(new string('#', n));
- for (int i = n - 1; i >= 0; i--)
- {
- Console.Write(new string('#', i));
- Console.Write("/");
- if (width > 2 * i + 2 * k + 4)
- {
- Console.Write(new string(' ', k));
- Console.Write("/");
- Console.Write(new string('.', width - 2 * k - 4 - 2 * i));
- Console.Write("\\");
- Console.Write(new string(' ', k));
- }
- else
- {
- Console.Write(new string(' ', width - 2 - 2 * i));
- }
- Console.Write("\\");
- Console.WriteLine(new string('#', i));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement