https://www.acmicpc.net/problem/10173

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _230112
{
    class App
    {
        public App()
        {
            //[BOJ] 10173 니모를 찾아서 
            string[] arr = {
                "Marlin names this last egg Nemo, a name that Coral liked.",
                "While attempting to save nemo, Marlin meets Dory,",
                "a good-hearted and optimistic regal blue tang with short-term memory loss.",
                "Upon leaving the East Australian Current,(888*%$^&%0928375)Marlin and Dory",
                "NEMO leaves for school and Marlin watches NeMo swim away."
            };

            //여기서부터 작성 하세요 
            for(int i = 0; i < arr.Length; i++)
            {
                string str = arr[i].ToLower();  //전체 소문자화하여 글자 체크
                if (str.Contains("nemo"))
                {
                    Console.WriteLine("Found");
                }
                else
                {
                    Console.WriteLine("Missing");
                }

            }

            //출력 
            //Found
            //Found
            //Missing
            //Missing
            //Found
        }
    }
}

+ Recent posts