백준

백준 9086번 c#

대왕군 2024. 1. 10. 16:47

 

using System;

namespace Baekjoon
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int count = int.Parse(Console.ReadLine());

            string input = "";
            string result = "";

            for (int i = 0; i < count; i++)
            {
                input = Console.ReadLine();
                //문자열.Substring(문자 자를 시작점, 시작점부터 추출할 문자길이)
                result = input.Substring(0, 1) + input.Substring(input.Length - 1, 1);
                Console.WriteLine(result);
            }
        }
    }
}

'백준' 카테고리의 다른 글

백준 11720번 c#  (0) 2024.01.11
백준 11654번 c#  (0) 2024.01.11
백준 15552번 c#  (0) 2024.01.10
백준 10811번 c#  (0) 2024.01.10
백준 3052번 c#  (0) 2024.01.10