Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- class CameraView
- {
- static void Main()
- {
- var skipTake = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
- int skip = skipTake[0];
- int take = skipTake[1];
- string picture = Console.ReadLine();
- string pattern = @"|<";
- string[] cameras = picture.Split(pattern);
- for (int i = 1; i < cameras.Length; i++)
- {
- string camera = cameras[i];
- string view = new string(camera.Skip(skip).Take(take).ToArray());
- if (i== 1)
- {
- Console.Write("{0}", view);
- continue;
- }
- Console.Write(", {0}", view);
- }
- Console.WriteLine();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement