예제 #1
0
        public static void Main(string[] args)
        {
            int[] stones = Console.ReadLine()?.Split(", ").Select(int.Parse).ToArray();

            Lake lake = new Lake(stones);

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

            var lake = new Lake(inputNumbers);

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

            Lake lake = new Lake(input);

            Console.WriteLine(string.Join(", ", lake));
        }
예제 #4
0
        public static void Main(string[] args)
        {
            int[] input = Console
                          .ReadLine()
                          .Split(new char[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries)
                          .Select(int.Parse)
                          .ToArray();

            Lake lake = new Lake(input);

            Console.WriteLine(string.Join(", ", lake));
        }