Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace StringDecryption
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] mn = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
- int[] array = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
- List<int> filtered = new List<int>();
- for (int i = 0; i < array.Length; i++)
- {
- if (array[i] >= 65 && array[i] <= 90)
- {
- filtered.Add(array[i]);
- }
- }
- int skip = mn[0];
- int take = mn[1];
- List<int> secondFilter = filtered.Skip(skip).Take(take).ToList();
- // Console.WriteLine($"Filtered: {string.Join(" ", filtered)}");
- // Console.WriteLine($"Second: {string.Join(" ", secondFilter)}");
- foreach (var chars in secondFilter)
- {
- Console.Write(Convert.ToChar(chars));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement