코딩 공부/C#

C# 백준 2941번 문제 크로아티아 알파벳

통통푸린 2022. 7. 26. 14:28
728x90
반응형

using System;


namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] arr = new string[8] { "c=", "c-", "dz=", "d-", "lj", "nj", "s=", "z=" };

            string str = Console.ReadLine();

            for (int i = 0; i<arr.Length; i++)
            {
                str = str.Replace(arr[i], "*");
            }

            Console.WriteLine(str.Length);
        }      
    }
}

728x90
반응형