static void Main(string[] args)
        {
            int[] stones = Console.ReadLine()?.Split(", ", StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
            Lake  lake   = new Lake(stones);

            Console.WriteLine(string.Join(", ", lake));
        }
        static void Main(string[] args)
        {
            List <int> stones = Console.ReadLine().Split(", ").Select(int.Parse).ToList();
            Lake       lake   = new Lake(stones);

            Console.WriteLine(string.Join(", ", lake));
        }
Example #3
0
        static void Main()
        {
            var  inputNums = Console.ReadLine().Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList();
            Lake game      = new Lake(inputNums);

            game.Play();
        }
Example #4
0
        static void Main(string[] args)
        {
            int[] nums = Console.ReadLine().Split(", ").Select(int.Parse).ToArray();

            Lake lake = new Lake(nums.ToList());

            Console.WriteLine(string.Join(", ", lake));
        }
Example #5
0
        static void Main(string[] args)
        {
            int[] stones = Console.ReadLine().Split(", ")
                           .Select(int.Parse).ToArray();
            Lake lakeStones = new Lake(stones);

            Console.WriteLine(string.Join(", ", lakeStones));
        }
Example #6
0
        public static void Main(string[] args)
        {
            var numbers = Console.ReadLine().Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);

            var stones = new Lake(numbers.ToList());

            Console.WriteLine(string.Join(", ", stones));
        }
Example #7
0
        public static void Main()
        {
            List <int> elements = Console.ReadLine().Split(", ").Select(int.Parse).ToList();

            Lake <int> lake = new Lake <int>(elements);

            Console.WriteLine(string.Join(", ", lake));
        }
Example #8
0
        public static void Main()
        {
            var input = Console.ReadLine().Split(", ", StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();

            var numbers = new Lake(input);

            Console.WriteLine(string.Join(", ", numbers));
        }
Example #9
0
        public static void Main()
        {
            var numbers = Console.ReadLine().Split(new[] { ',', ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToList();

            var lake = new Lake(numbers);


            Console.WriteLine(string.Join(", ", lake));
        }
Example #10
0
        static void Main(string[] args)
        {
            Lake lake = new Lake(Console.ReadLine()
                                 .Split(", ")
                                 .Select(int.Parse)
                                 .ToArray());

            Console.WriteLine(String.Join(", ", lake));
        }
Example #11
0
        public static void Main()
        {
            var elements = Console.ReadLine()
                           .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                           .Select(int.Parse).ToList();
            var lake = new Lake <int>(elements);

            Console.WriteLine(string.Join(", ", lake));
        }
Example #12
0
        static void Main(string[] args)
        {
            List <int> stones = Console.ReadLine()
                                .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                                .Select(int.Parse)
                                .ToList();
            Lake lake = new Lake(stones);

            Console.WriteLine(string.Join(", ", lake));
        }
        public static void Main()
        {
            var stones = Console.ReadLine()
                         .Split(" ,".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
                         .Select(int.Parse)
                         .ToList();
            var lake = new Lake(stones);

            Console.Write(string.Join(", ", lake));
        }
Example #14
0
        public static void Main()
        {
            var inputStones = Console.ReadLine()
                              .Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries)
                              .Select(int.Parse)
                              .ToList();

            Lake myLake = new Lake(inputStones);

            Console.WriteLine(string.Join(", ", myLake));
        }
Example #15
0
        private static void Main()
        {
            IList <int> numbers = Console.ReadLine().Split(new[] { ", ", " ", "," }, StringSplitOptions.RemoveEmptyEntries)
                                  .Select(int.Parse).ToList();

            Lake <int> lake = new Lake <int>(numbers);

            lake.Move();

            Console.WriteLine(string.Join(", ", lake));
        }
Example #16
0
        public static void Main()
        {
            var inputNumbers = Console.ReadLine()
                               .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                               .Select(int.Parse)
                               .ToArray();

            var lake = new Lake(inputNumbers);

            Console.WriteLine(string.Join(", ", lake));
        }
Example #17
0
        static void Main()
        {
            var input = Console.ReadLine()
                        .Split(", ", StringSplitOptions.RemoveEmptyEntries)
                        .Select(int.Parse)
                        .ToList();

            var lake = new Lake(input);

            Console.WriteLine(string.Join(", ", lake));
        }
Example #18
0
        public static void Main()
        {
            var stonesInput = Console.ReadLine()
                              .Split(new[] { ",", " " }, StringSplitOptions.RemoveEmptyEntries)
                              .Select(int.Parse)
                              .ToList();

            var jumpsResult = new Lake(stonesInput);

            Console.WriteLine(string.Join(", ", jumpsResult));
        }
Example #19
0
        static void Main(string[] args)
        {
            List <int> list = new List <int>(Console.ReadLine()
                                             .Split(new[] { ',', ' ' },
                                                    StringSplitOptions.RemoveEmptyEntries)
                                             .Select(int.Parse)
                                             .ToList());
            Lake lake = new Lake(list);

            lake.Print();
        }
Example #20
0
        static void Main()
        {
            int[] input = Console.ReadLine().
                          Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries).
                          Select(int.Parse).
                          ToArray();

            Lake lake = new Lake(input);

            Console.WriteLine(string.Join(", ", lake));
        }
        static void Main(string[] args)
        {
            List <int> numbers = Console
                                 .ReadLine()
                                 .Split(", ")
                                 .Select(int.Parse)
                                 .ToList();

            Lake stonesNumber = new Lake(numbers);

            Console.WriteLine(string.Join(", ", stonesNumber));
        }
Example #22
0
        public static void Main()
        {
            var stoneNumbers = Console.ReadLine()
                               .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                               .Select(int.Parse);
            var lake = new Lake(stoneNumbers);
            var sb   = new StringBuilder();

            foreach (var stone in lake)
            {
                sb.Append(stone + ", ");
            }

            Console.WriteLine(sb.ToString());
        }
Example #23
0
        static void Main(string[] args)
        {
            var numbers = Console.ReadLine()
                          .Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries)
                          .Select(int.Parse)
                          .ToList();
            var lake = new Lake(numbers);

            var result = string.Empty;

            foreach (var jump in lake)
            {
                result += jump + ", ";
            }
            Console.WriteLine(result.Substring(0, result.Length - 2));
        }
Example #24
0
        static void Main(string[] args)
        {
            List <string> inputNumbers = Console.ReadLine().Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();

            Lake <string> lake = new Lake <string>(inputNumbers);

            string result = "";

            foreach (var element in lake)
            {
                result += string.Format($"{element}, ");
            }


            Console.WriteLine(result.Substring(0, result.Length - 2));
        }
Example #25
0
        public static void Main()
        {
            List <int> numbers =
                Console.ReadLine().Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList();

            var lake = new Lake(numbers);

            var result = new StringBuilder();

            foreach (var number in lake)
            {
                result.Append(number + ", ");
            }

            Console.WriteLine(result.ToString().Trim().TrimEnd(','));
        }
Example #26
0
        public static void Main(string[] args)
        {
            int[] stones = Console.ReadLine()?
                           .Split(", ", StringSplitOptions.RemoveEmptyEntries)
                           .Select(int.Parse)
                           .ToArray();

            Lake lake = new Lake(stones);

            /*List<int> path = new List<int>();
             * foreach (int stone in lake)
             * {
             *  path.Add(stone);
             * }*/

            Console.WriteLine(String.Join(", ", lake));
        }
Example #27
0
        public static void Main()
        {
            var stones = Console.ReadLine()
                         .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                         .Select(int.Parse)
                         .ToArray();
            var result = new List <int>();

            var lake = new Lake(stones);

            foreach (var stone in lake)
            {
                result.Add(stone);
            }

            Console.WriteLine(string.Join(", ", result));
        }
        static void Main()
        {
            string input = Console.ReadLine();

            int[] tokens = input.Split(", ")
                           .Select(int.Parse)
                           .ToArray();

            Lake lake   = new Lake(tokens);
            var  stones = new List <int>();

            foreach (var stone in lake)
            {
                stones.Add(stone);
            }

            Console.WriteLine(String.Join(", ", stones));
        }
Example #29
0
        public static void Main()
        {
            int[] inputNums = Console.ReadLine()
                              .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                              .Select(int.Parse)
                              .ToArray();


            Lake <int>    myLake  = new Lake <int>(inputNums);
            StringBuilder builder = new StringBuilder();

            foreach (var item in myLake)
            {
                builder.Append($"{item}, ");
            }

            Console.WriteLine(builder.ToString().TrimEnd(' ', ','));
        }
Example #30
0
        public static void Main()
        {
            int[] numbers = Console.ReadLine()
                            .Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                            .Select(int.Parse)
                            .ToArray();

            Lake lake = new Lake(numbers);

            List <int> list = new List <int>();

            foreach (var currentStone in lake)
            {
                list.Add(currentStone);
            }

            Console.WriteLine(String.Join(", ", list));
        }