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
}
}
}
'Algorithm > BOJ' 카테고리의 다른 글
C#) [BOJ] 1120 문자열 (0) | 2023.01.13 |
---|---|
C# 문자열) [BOJ] 1181 단어 정렬 (0) | 2023.01.12 |
C# 문자열)[BOJ] 4458 첫 글자를 대문자로 (0) | 2023.01.12 |
C# 문자열)[BOJ] 2711 오타맨 고창영 (0) | 2023.01.12 |
C# 문자열) [BOJ] 9086 문자열 (0) | 2023.01.12 |