コード例 #1
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));
        }
コード例 #2
0
        public 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));
        }