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));
        }
Ejemplo n.º 3
0
        static void Main()
        {
            var  inputNums = Console.ReadLine().Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList();
            Lake game      = new Lake(inputNums);

            game.Play();
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 10
0
        static void Main(string[] args)
        {
            Lake lake = new Lake(Console.ReadLine()
                                 .Split(", ")
                                 .Select(int.Parse)
                                 .ToArray());

            Console.WriteLine(String.Join(", ", lake));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 21
0
        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));
        }
Ejemplo n.º 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());
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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(','));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 28
0
        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));
        }
Ejemplo n.º 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(' ', ','));
        }
Ejemplo n.º 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));
        }